{
    "schema_version":  1,
    "document_version":  "1.2",
    "scope":  "Dada P0-A Windows localhost only",
    "generated_date":  "2026-08-03",
    "authority":  {
                      "product":  "PRD.md v1.10",
                      "engineering":  "DevelopmentPlan.md v1.2",
                      "ui":  "UIDesign.md v1.1",
                      "tdd":  "tdd.md hash-locked file, internal version 1.5"
                  },
    "source_hashes":  {
                          "PRD.md":  "31F93674DF1A90B557FEE3AA9E74FB084E246CA8FE09F6BD4B1DC9D56D606565",
                          "FeatureSummary.md":  "6F80E272AAB08A5525B54501D83F16A4F6A7A170596947BBC25F1DA54F2FE844",
                          "DevelopmentPlan.md":  "76CCC786E910F3E503921AEF5B9BD22976E364184BA8C0062CDCF1C5F376AC0A",
                          "UIDesign.md":  "40A9EA29B921989877A01253A686F12A0EDE93454F8A23ADD5C0511616FCC35C",
                          "tdd.md":  "894165E188D9B821F81E1E1418011D38D3591873DDD5A23BA8C271C322B2F66E",
                          "Dada-P0A-LowFi.pen":  "A352C8F205E9399EB2E6306176253AF6FF65DDDBB9FDCEA2E2FE13E3C3459975",
                          "tasks.md":  "A2925C283D9BEFA3E7316A675239ED343936D56403A390317A4C3272AE81CCE9"
                      },
    "module_boundary_policy":  "modules are frozen DevelopmentPlan components; exact repository paths are intentionally not invented before WP-0 creates the monorepo layout",
    "evidence_root":  "artifacts/tdd/\u003crun_id\u003e/",
    "task_count":  52,
    "parent_family_count":  89,
    "normative_case_count":  117,
    "tasks":  [
                  {
                      "task_id":  "TASK-WP0-01",
                      "work_package":  "WP-0",
                      "title":  "工程骨架与冻结依赖",
                      "dependencies":  {
                                           "source_text":  "无",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-24",
                                                  "AC-46",
                                                  "AC-55",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "supporting",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-09、DevelopmentPlan 2.1、13.1",
                                                     "DevelopmentPlan WP-0 工程前置，supporting AC-24、46、55、56；不取得 AC 唯一主责"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "1.5 工程基础设施前置条件",
                                                        "2.1 固定技术基线",
                                                        "2.2 组件边界",
                                                        "3.4 环境关系",
                                                        "14.1 测试层级",
                                                        "15 WP-0"
                                                    ],
                      "modules":  [
                                      "release-ci",
                                      "web",
                                      "api",
                                      "worker",
                                      "supervisor",
                                      "shared-contracts"
                                  ],
                      "implementation_boundary":  "建立 pnpm monorepo、唯一 lockfile、React/Vite/TypeScript、Fabric、Fastify、TypeBox、Drizzle/better-sqlite3、Node Worker 和 .NET 8 Supervisor 最小可运行骨架；接通第 2.4 节脚本入口",
                      "parent_families":  [
                                              "TDD-WP0-DEP-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-DEP-001-frozen-toolchain"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-DEP-001",
                                            "assertion":  "冻结依赖任一无法安装、加载或最小运行"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-DEP-001",
                                                "assertion":  "精确版本、TypeScript、React/Fabric、Fastify、better-sqlite3 native 和随包 Node 全通过；不私自替换技术栈"
                                            }
                                        ],
                      "task_green_gate":  "精确版本安装、类型检查、React/Fabric 渲染、Fastify、native 模块和随包 Node 预检通过；失败时先修订 DevelopmentPlan，不得私自换栈",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-ci, web, api, worker, supervisor, shared-contracts.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "PKG-SEC"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-DEP-001-frozen-toolchain/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP0-02",
                      "work_package":  "WP-0",
                      "title":  "Schema、OpenAPI 与事件基线",
                      "dependencies":  {
                                           "source_text":  "TASK-WP0-01",
                                           "task_ids":  [
                                                            "TASK-WP0-01"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "GEN-14",
                                           "NFR-05",
                                           "PROJECT-04"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-20",
                                                  "AC-30"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-05、DevelopmentPlan 6.1、6.6",
                                                     "PROJECT-04、GEN-14、NFR-05、DevelopmentPlan 6.2、AC-20、30"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "6.1 通用协议",
                                                        "6.2 API 分组",
                                                        "6.6 新增稳定错误码",
                                                        "14.1 测试层级"
                                                    ],
                      "modules":  [
                                      "shared-contracts",
                                      "api",
                                      "web"
                                  ],
                      "implementation_boundary":  "建立 TypeBox 单一 Schema 来源、OpenAPI 3.1、生成客户端、统一错误信封、correlation ID、SSE 非敏感事件和 REST refetch/bootstrap",
                      "parent_families":  [
                                              "TDD-WP0-API-001",
                                              "TDD-WP0-EVT-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-API-001-schema-envelope",
                                       "TDD-WP0-EVT-001-rest-refetch"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-API-001",
                                            "assertion":  "TypeBox、OpenAPI、生成客户端或错误信封漂移"
                                        },
                                        {
                                            "family_id":  "TDD-WP0-EVT-001",
                                            "assertion":  "SSE 携带私有正文、被客户端当作业务真相或事件缺号后不恢复"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-API-001",
                                                "assertion":  "OpenAPI 3.1 snapshot 与运行验证一致；响应有 correlation ID；details 只含白名单字段且不泄露内部信息"
                                            },
                                            {
                                                "family_id":  "TDD-WP0-EVT-001",
                                                "assertion":  "事件只含固定非敏感字段；客户端收到后 REST refetch；断线/缺号 bootstrap；配置和 runtime 版本分离"
                                            }
                                        ],
                      "task_green_gate":  "OpenAPI snapshot 与运行校验一致；事件不承载业务真相或私有正文；断线/缺号恢复通过",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: shared-contracts, api, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-API-001-schema-envelope/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-EVT-001-rest-refetch/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP0-03",
                      "work_package":  "WP-0",
                      "title":  "回环访问与浏览器硬门禁",
                      "dependencies":  {
                                           "source_text":  "TASK-WP0-02",
                                           "task_ids":  [
                                                            "TASK-WP0-02"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-01",
                                           "NFR-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-24",
                                                  "AC-41"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-01、AC-24",
                                                     "NFR-01、AC-24、41",
                                                     "NFR-09、AC-24"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "3.6 浏览器支持硬门禁",
                                                        "6.4 HTTP 语义",
                                                        "12.1 本机安全边界",
                                                        "13.3 可访问性基础",
                                                        "14.7 AC-24"
                                                    ],
                      "modules":  [
                                      "api",
                                      "web-support-gate",
                                      "supervisor"
                                  ],
                      "implementation_boundary":  "固定 127.0.0.1:43121、Host/Origin/CORS 防护、最小 gate shell、UA-CH 交叉校验、24 小时短期支持 Cookie、全产品路由前置 426 门禁",
                      "parent_families":  [
                                              "TDD-WP0-BND-001",
                                              "TDD-WP0-BRW-001",
                                              "TDD-WP0-BRW-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-BND-001-loopback-origin",
                                       "TDD-WP0-BRW-001-real-supported",
                                       "TDD-WP0-BRW-002-hard-block"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-BND-001",
                                            "assertion":  "API 接受非回环绑定、错误 Host/Origin 或 CORS"
                                        },
                                        {
                                            "family_id":  "TDD-WP0-BRW-001",
                                            "assertion":  "真实支持 Chrome/Edge 无法通过门禁"
                                        },
                                        {
                                            "family_id":  "TDD-WP0-BRW-002",
                                            "assertion":  "其他品牌、错误 major、UA-CH 缺失/冲突或直调 API 可进入产品"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-BND-001",
                                                "assertion":  "只绑定 127.0.0.1:43121；拒绝局域网、其他 Host/Origin，不创建防火墙入站规则"
                                            },
                                            {
                                                "family_id":  "TDD-WP0-BRW-001",
                                                "assertion":  "RELEASE.json 记录的两个真实 full version 通过并建立短期支持 Cookie，产品 API 每次复核品牌/major"
                                            },
                                            {
                                                "family_id":  "TDD-WP0-BRW-002",
                                                "assertion":  "全部返回 426 BROWSER_UNSUPPORTED，只有最小引导，无登录、资源、DB 业务读取或外部调用，无绕过令牌"
                                            }
                                        ],
                      "task_green_gate":  "局域网/其他 Host/Origin、非 Windows、其他品牌、错误 major、UA-CH 缺失/冲突和直调 API 均不可进入；支持分支最终 passed 等待 WP-7 真实记录",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, web-support-gate, supervisor.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "API",
                                     "PKG-SEC",
                                     "E2E",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:api",
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-BND-001-loopback-origin/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-BRW-001-real-supported/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-BRW-002-hard-block/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "support-gate",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "u1adni",
                                                          "frame_name":  "07A 浏览器硬阻断",
                                                          "primary_task":  "TASK-WP0-03",
                                                          "mapped_state_scope":  "四种阻断 reason、支持品牌/major、最小诊断；bundle/API 无绕过；无业务空态、身份或容量读取"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "support-gate",
                                                                     "actor_entry":  "所有主体，产品门禁前",
                                                                     "normal":  "四种阻断 reason、支持品牌/major、无继续入口",
                                                                     "empty_loading":  "N/A：引导无业务空态；身份不可判定属于阻断",
                                                                     "failure_disabled":  "bundle/API 均无法绕过；诊断仅最小字段",
                                                                     "conflict_capacity_special":  "N/A：不读取业务状态或容量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/support-gate/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP0-04",
                      "work_package":  "WP-0",
                      "title":  "LocalDataRoot 与本机数据边界",
                      "dependencies":  {
                                           "source_text":  "TASK-WP0-01",
                                           "task_ids":  [
                                                            "TASK-WP0-01"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "AUTH-06",
                                           "NFR-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-24",
                                                  "AC-41",
                                                  "AC-55",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.19"
                                            ],
                      "requirement_ac_sources":  [
                                                     "AUTH-06、NFR-09、AC-24、56",
                                                     "NFR-09、17.19、AC-41、55、56"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "3.2 Supervisor 生命周期",
                                                        "3.3 离线配置命令",
                                                        "4.1 固定目录布局",
                                                        "4.2 文件标识与路径隔离",
                                                        "9.2 项目、历史、失败草稿和回收站",
                                                        "12.1 本机安全边界"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "local-data-root",
                                      "web"
                                  ],
                      "implementation_boundary":  "建立目录布局、路径规范化、资源 ID 隔离、data_missing、只读素材根校验、无备份/无归档/无迁移边界和固定本机风险提示接线",
                      "parent_families":  [
                                              "TDD-WP0-DATA-001",
                                              "TDD-WP0-DATA-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-DATA-001-root-validation",
                                       "TDD-WP0-DATA-002-no-backup-migration"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-DATA-001",
                                            "assertion":  "LocalDataRoot 位于仓库/项目/下载/素材根，或丢失后自动重建"
                                        },
                                        {
                                            "family_id":  "TDD-WP0-DATA-002",
                                            "assertion":  "产品出现自动备份、项目包、业务导入或 P0-B 迁移"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-DATA-001",
                                                "assertion":  "路径校验拒绝违规目录；已初始化根缺失进入 data_missing；浏览器只见资源 ID"
                                            },
                                            {
                                                "family_id":  "TDD-WP0-DATA-002",
                                                "assertion":  "只允许下载原始生成图和 JPG/PNG；删除根或重装不可恢复；固定本机风险文案持续显示"
                                            }
                                        ],
                      "task_green_gate":  "违规目录、符号链接和路径逃逸拒绝；已初始化根缺失不自动重建；浏览器不见绝对路径；产品无业务导入/项目包/恢复入口",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, local-data-root, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "PKG-SEC",
                                     "E2E",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-DATA-001-root-validation/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-DATA-002-no-backup-migration/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "settings",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "Ws5E0",
                                                          "frame_name":  "05B 设置与本机数据",
                                                          "primary_task":  "TASK-WP1-05",
                                                          "mapped_state_scope":  "资料、本机数据、容量摘要和固定文案；加载/保存失败；full/unavailable；注销确认、处理中和返回登录"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "settings",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "资料、本机数据、容量摘要、固定文案、注销",
                                                                     "empty_loading":  "资料/状态加载",
                                                                     "failure_disabled":  "保存失败；注销确认/处理中禁用重复提交",
                                                                     "conflict_capacity_special":  "full/unavailable 状态与允许动作；注销后返回登录"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/settings/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP0-05",
                      "work_package":  "WP-0",
                      "title":  "容量状态、预留与文件一致性",
                      "dependencies":  {
                                           "source_text":  "TASK-WP0-02、TASK-WP0-04",
                                           "task_ids":  [
                                                            "TASK-WP0-02",
                                                            "TASK-WP0-04"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-06",
                                           "EXPORT-06",
                                           "NFR-05",
                                           "PROJECT-04"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-31",
                                                  "AC-35",
                                                  "AC-44",
                                                  "AC-55"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.19"
                                            ],
                      "requirement_ac_sources":  [
                                                     "17.19、AC-55",
                                                     "17.19、NFR-05、AC-35、55",
                                                     "17.19、NFR-05、AC-55",
                                                     "17.19、PROJECT-04、EXPORT-06、AC-55",
                                                     "ADMIN-06、17.19、AC-31、55",
                                                     "NFR-05、17.19、AC-44、55"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "4.3 文件与数据库一致性",
                                                        "4.4 LocalBackendStorageState 实现",
                                                        "5.3 支撑表",
                                                        "14.7 AC-55"
                                                    ],
                      "modules":  [
                                      "api",
                                      "worker",
                                      "sqlite",
                                      "local-data-root"
                                  ],
                      "implementation_boundary":  "实现 LocalBackendStorageState、精确阈值、storage reservation、staging 流式校验、同卷原子改名、managed file、补偿队列、启动对账和物理删除后重测",
                      "parent_families":  [
                                              "TDD-WP0-FILE-001",
                                              "TDD-WP0-STO-001",
                                              "TDD-WP0-STO-002",
                                              "TDD-WP0-STO-003"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-FILE-001-atomic-commit",
                                       "TDD-WP0-STO-001-byte-thresholds",
                                       "TDD-WP0-STO-002-equal-limit",
                                       "TDD-WP0-STO-002-over-limit",
                                       "TDD-WP0-STO-003-cleanup-remeasure",
                                       "TDD-WP0-STO-003-full-matrix",
                                       "TDD-WP0-STO-003-unavailable-matrix"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-FILE-001",
                                            "assertion":  "文件流、数据库事务或进程崩溃产生可读半文件、孤儿引用或计量漂移"
                                        },
                                        {
                                            "family_id":  "TDD-WP0-STO-001",
                                            "assertion":  "任一阈值使用模糊比例或边界错一字节"
                                        },
                                        {
                                            "family_id":  "TDD-WP0-STO-002",
                                            "assertion":  "写入预计量用 \u003e= 拒绝等号，或超限后仍有副作用"
                                        },
                                        {
                                            "family_id":  "TDD-WP0-STO-003",
                                            "assertion":  "full/unavailable 动作混淆或清理排队即减字节"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-FILE-001",
                                                "assertion":  "预检、staging 流式哈希/MIME、同卷原子改名、SQLite 提交、补偿队列和启动对账全覆盖；路径规范化拒绝 ..、符号链接逃逸和 manifest 外对象"
                                            },
                                            {
                                                "family_id":  "TDD-WP0-STO-001",
                                                "assertion":  "第 5.5 节七个精确字节值产生固定 notice/status"
                                            },
                                            {
                                                "family_id":  "TDD-WP0-STO-002",
                                                "assertion":  "\u003e 才拒绝；等于上限提交成功后 full；超限不创建任务、冻结、文件关系或上游调用"
                                            },
                                            {
                                                "family_id":  "TDD-WP0-STO-003",
                                                "assertion":  "full 允许 JSON 保存与客户端仅下载；unavailable 拒绝新增后端写；物理删除和重测前计量不变"
                                            }
                                        ],
                      "task_green_gate":  "写前只用 \u003e 拒绝，恰好 5 GB 写入成功后 full；超限零副作用；full/unavailable 动作不同；未物理删除前不减字节",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "WRK",
                                     "UNIT",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:worker",
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-FILE-001-atomic-commit/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-001-byte-thresholds/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-002-equal-limit/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-002-over-limit/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-003-cleanup-remeasure/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-003-full-matrix/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-STO-003-unavailable-matrix/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP0-06",
                      "work_package":  "WP-0",
                      "title":  "公开客户端缓存",
                      "dependencies":  {
                                           "source_text":  "TASK-WP0-02、TASK-WP0-04",
                                           "task_ids":  [
                                                            "TASK-WP0-02",
                                                            "TASK-WP0-04"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-07"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-46",
                                                  "AC-48"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.14"
                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-07、17.14、AC-46、48"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.4 素材面板与公开缓存",
                                                        "10.6 三类资源隔离",
                                                        "12.1 本机安全边界"
                                                    ],
                      "modules":  [
                                      "web",
                                      "api",
                                      "client-cache"
                                  ],
                      "implementation_boundary":  "建立 150 MiB public allowlist LRU、Cache Storage/IndexedDB 元数据、写前淘汰和 Service Worker 路由边界",
                      "parent_families":  [
                                              "TDD-WP0-CACHE-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-CACHE-001-public-lru"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-CACHE-001",
                                            "assertion":  "应用缓存超过 157,286,400 字节或含私有/内部内容"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-CACHE-001",
                                                "assertion":  "LRU 在写前淘汰；只含 allowlist 公开资源；逐场景枚举 SW、Cache Storage、IndexedDB"
                                            }
                                        ],
                      "task_green_gate":  "逐场景枚举实际浏览器存储；internal/private/项目/提示词/未保存草稿均不进入持久缓存",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web, api, client-cache.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-CACHE-001-public-lru/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP0-07",
                      "work_package":  "WP-0",
                      "title":  "Supervisor、凭据和运行诊断",
                      "dependencies":  {
                                           "source_text":  "TASK-WP0-01、TASK-WP0-04、TASK-WP0-05",
                                           "task_ids":  [
                                                            "TASK-WP0-01",
                                                            "TASK-WP0-04",
                                                            "TASK-WP0-05"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-09",
                                           "PRIV-01"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-24",
                                                  "AC-41"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-09、AC-24、41",
                                                     "PRIV-01、AC-41"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "3.1 便携包布局",
                                                        "3.2 Supervisor 生命周期",
                                                        "3.3 离线配置命令",
                                                        "3.7 辅助系统界面契约",
                                                        "12.3 审计与敏感信息"
                                                    ],
                      "modules":  [
                                      "supervisor",
                                      "api",
                                      "worker",
                                      "windows-credential-manager"
                                  ],
                      "implementation_boundary":  "实现单实例 mutex、固定端口检查、API/Worker 启停与有限重启、15 秒退出、Credential Manager 匿名管道注入、托盘状态、离线配置命令和脱敏诊断",
                      "parent_families":  [
                                              "TDD-WP0-SEC-001",
                                              "TDD-WP0-SUP-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-SEC-001-credential-channel",
                                       "TDD-WP0-SUP-001-lifecycle"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-SEC-001",
                                            "assertion":  "凭据进入参数、环境、文件、日志或错误"
                                        },
                                        {
                                            "family_id":  "TDD-WP0-SUP-001",
                                            "assertion":  "第二实例、端口占用、API/Worker 崩溃或退出留下残留进程"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-SEC-001",
                                                "assertion":  "Supervisor 通过继承匿名管道最小传递；API/Worker 分离；缺失、清除、重启和扫描全通过"
                                            },
                                            {
                                                "family_id":  "TDD-WP0-SUP-001",
                                                "assertion":  "mutex、固定端口、有限重启、degraded 状态、15 秒优雅退出和托盘允许动作符合 DevelopmentPlan"
                                            }
                                        ],
                      "task_green_gate":  "第二实例、端口占用、startup/api/worker degraded、凭据缺失/清除/重启和子进程残留均有确定行为；不动态换端口、不泄露凭据",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: supervisor, api, worker, windows-credential-manager.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "PKG-SEC",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-SEC-001-credential-channel/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-SUP-001-lifecycle/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "system-ui",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "awt96",
                                                          "frame_name":  "07B Windows 辅助系统界面",
                                                          "primary_task":  "TASK-WP0-07",
                                                          "mapped_state_scope":  "托盘/启动中/ready；启动失败、端口占用、API/Worker degraded；脱敏诊断；full/unavailable 告警与受限动作"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "system-ui",
                                                                     "actor_entry":  "本机托盘/Supervisor，无产品角色",
                                                                     "normal":  "托盘、运行状态、打开 Dada、诊断、退出",
                                                                     "empty_loading":  "启动中；N/A 业务空态",
                                                                     "failure_disabled":  "启动失败、端口占用、API/Worker degraded，动作严格受限",
                                                                     "conflict_capacity_special":  "full/unavailable 只作脱敏告警；固定端口不动态切换"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP0-08",
                      "work_package":  "WP-0",
                      "title":  "日志、轮转和不可写联动",
                      "dependencies":  {
                                           "source_text":  "TASK-WP0-05、TASK-WP0-07",
                                           "task_ids":  [
                                                            "TASK-WP0-05",
                                                            "TASK-WP0-07"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-09",
                                           "PRIV-01",
                                           "PRIV-02"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-41",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "PRIV-01、02、NFR-09、AC-41、56"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "4.5 日志与数据库维护",
                                                        "12.3 审计与敏感信息"
                                                    ],
                      "modules":  [
                                      "api",
                                      "worker",
                                      "supervisor",
                                      "local-data-root"
                                  ],
                      "implementation_boundary":  "建立 API/Worker/Supervisor JSONL 白名单日志、10 MiB/10 文件/30 天轮转、诊断复用脱敏器和日志不可写状态联动",
                      "parent_families":  [
                                              "TDD-WP0-LOG-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-LOG-001-rotation-redaction"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-LOG-001",
                                            "assertion":  "日志无限增长、含敏感数据或目录不可写后仍调用 AI"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-LOG-001",
                                                "assertion":  "10 MiB/10 文件/30 天轮转；白名单字段；写失败进入 unavailable 并阻断 AI"
                                            }
                                        ],
                      "task_green_gate":  "日志不含密钥、邮箱、提示词、图片、绝对路径或供应商原文；日志不可写进入 unavailable 并阻断 AI",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, worker, supervisor, local-data-root.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "WRK",
                                     "PKG-SEC"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:worker",
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-LOG-001-rotation-redaction/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "system-ui",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "awt96",
                                                          "frame_name":  "07B Windows 辅助系统界面",
                                                          "primary_task":  "TASK-WP0-07",
                                                          "mapped_state_scope":  "托盘/启动中/ready；启动失败、端口占用、API/Worker degraded；脱敏诊断；full/unavailable 告警与受限动作"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "system-ui",
                                                                     "actor_entry":  "本机托盘/Supervisor，无产品角色",
                                                                     "normal":  "托盘、运行状态、打开 Dada、诊断、退出",
                                                                     "empty_loading":  "启动中；N/A 业务空态",
                                                                     "failure_disabled":  "启动失败、端口占用、API/Worker degraded，动作严格受限",
                                                                     "conflict_capacity_special":  "full/unavailable 只作脱敏告警；固定端口不动态切换"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP0-09",
                      "work_package":  "WP-0",
                      "title":  "隔离 CI 与便携包",
                      "dependencies":  {
                                           "source_text":  "TASK-WP0-01 至 TASK-WP0-08",
                                           "task_ids":  [
                                                            "TASK-WP0-01",
                                                            "TASK-WP0-08"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-01",
                                           "NFR-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-24",
                                                  "AC-41",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-01、09、AC-24、41、56"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "3.1 便携包布局",
                                                        "3.4 环境关系",
                                                        "14.1 测试层级",
                                                        "15 WP-0"
                                                    ],
                      "modules":  [
                                      "release-ci",
                                      "supervisor",
                                      "api",
                                      "worker",
                                      "web"
                                  ],
                      "implementation_boundary":  "配置 Windows Gitea Runner 隔离流水线；生成 Dada.exe、随包 Node、API/Worker、迁移、资源元数据、RELEASE.json 占位规则、START-HERE.txt、ZIP 和 SHA-256",
                      "parent_families":  [
                                              "TDD-WP0-PKG-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP0-PKG-001-portable-zip"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP0-PKG-001",
                                            "assertion":  "ZIP 缺组件、包含真实配置或动态换端口"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP0-PKG-001",
                                                "assertion":  "便携布局、SHA-256、START-HERE、RELEASE 记录和固定端口全部正确，制品零凭据"
                                            }
                                        ],
                      "task_green_gate":  "CI 不读真实凭据、LocalDataRoot 或 3.57 GB 归档；包固定 43121、零真实配置/路径；正式 RELEASE 记录在 WP-7 冻结",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-ci, supervisor, api, worker, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "PKG-SEC"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP0-PKG-001-portable-zip/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-0",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "system-ui",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "awt96",
                                                          "frame_name":  "07B Windows 辅助系统界面",
                                                          "primary_task":  "TASK-WP0-07",
                                                          "mapped_state_scope":  "托盘/启动中/ready；启动失败、端口占用、API/Worker degraded；脱敏诊断；full/unavailable 告警与受限动作"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "system-ui",
                                                                     "actor_entry":  "本机托盘/Supervisor，无产品角色",
                                                                     "normal":  "托盘、运行状态、打开 Dada、诊断、退出",
                                                                     "empty_loading":  "启动中；N/A 业务空态",
                                                                     "failure_disabled":  "启动失败、端口占用、API/Worker degraded，动作严格受限",
                                                                     "conflict_capacity_special":  "full/unavailable 只作脱敏告警；固定端口不动态切换"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP1-01",
                      "work_package":  "WP-1",
                      "title":  "认证数据与邀请注册事务",
                      "dependencies":  {
                                           "source_text":  "WP-0",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "AUTH-01",
                                           "AUTH-02",
                                           "AUTH-03",
                                           "AUTH-04",
                                           "NFR-04"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-01",
                                                  "AC-02",
                                                  "AC-45"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "AUTH-01 至 04、AC-01",
                                                     "AUTH-01、02、AC-02",
                                                     "AUTH-01、NFR-04、AC-01、02、45"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-CHALLENGE",
                                          "FX-INVITE-EXPIRED",
                                          "FX-INVITE-VALID"
                                      ],
                      "development_plan_sections":  [
                                                        "5.2 十九个产品数据契约映射",
                                                        "6.2 API 分组",
                                                        "7.3 生成提交事务",
                                                        "9.1 邀请注册、验证码、会话和管理员"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "resend-adapter",
                                      "shared-contracts"
                                  ],
                      "implementation_boundary":  "建立 UserProfile、邀请码、验证码挑战、普通账号初始点数/registration_grant、幂等键与事务；接入 Resend mock",
                      "parent_families":  [
                                              "TDD-WP1-AUTH-001",
                                              "TDD-WP1-AUTH-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP1-AUTH-001-final-recheck-race",
                                       "TDD-WP1-AUTH-001-valid-register",
                                       "TDD-WP1-AUTH-002-invalid-invite"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP1-AUTH-001",
                                            "assertion":  "有效邀请注册任一步部分成功"
                                        },
                                        {
                                            "family_id":  "TDD-WP1-AUTH-002",
                                            "assertion":  "无效/过期/停用/耗尽邀请码仍发码或占用次数"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP1-AUTH-001",
                                                "assertion":  "发码前和建号前复核；账号、初始 10 点、registration_grant、告知版本和邀请码次数同事务一次提交"
                                            },
                                            {
                                                "family_id":  "TDD-WP1-AUTH-002",
                                                "assertion":  "不发码、不建号、不赠点，返回稳定原因且无副作用"
                                            }
                                        ],
                      "task_green_gate":  "发码前/建号前复核；有效注册一次提交；无效、过期、停用、耗尽邀请零副作用",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, resend-adapter, shared-contracts.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-001-final-recheck-race/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-001-valid-register/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-002-invalid-invite/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-1",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-invites",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "创建/停用/期限/次数/脱敏复制、空/骨架、名额满、过期/耗尽、请求失败和幂等/CAS 结果"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-invites",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "创建、停用、期限/次数、脱敏复制",
                                                                     "empty_loading":  "无邀请码；表格骨架",
                                                                     "failure_disabled":  "名额满、停用/过期/耗尽不可当可用；请求失败",
                                                                     "conflict_capacity_special":  "CAS/幂等结果；页面操作不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-invites/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP1-02",
                      "work_package":  "WP-1",
                      "title":  "登录状态机、会话与登录画面",
                      "dependencies":  {
                                           "source_text":  "TASK-WP1-01",
                                           "task_ids":  [
                                                            "TASK-WP1-01"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "AUTH-01",
                                           "AUTH-02",
                                           "AUTH-04",
                                           "AUTH-05",
                                           "AUTH-06",
                                           "AUTH-07"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-22",
                                                  "AC-33",
                                                  "AC-49"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "AUTH-01、02、05、06、AC-33",
                                                     "AUTH-02、04、AC-33",
                                                     "AUTH-04 至 07、AC-22、33、49"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-CHALLENGE"
                                      ],
                      "development_plan_sections":  [
                                                        "6.2 API 分组",
                                                        "6.3 鉴权与会话",
                                                        "9.1 邀请注册、验证码、会话和管理员"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "web"
                                  ],
                      "implementation_boundary":  "实现注册/登录分离入口、未注册/已注册/已注销/suspended 状态、10 分钟验证码、60 秒重发、30 天 opaque session、CSRF 和退出/暂停/注销撤销；按 Z0pf8 落实普通用户登录布局、艺术带、管理员文字入口、固定本机提示和焦点",
                      "parent_families":  [
                                              "TDD-WP1-AUTH-003",
                                              "TDD-WP1-AUTH-004"
                                          ],
                      "case_ids":  [
                                       "TDD-WP1-AUTH-003-entry-state-matrix",
                                       "TDD-WP1-AUTH-004-challenge-guards",
                                       "TDD-WP1-AUTH-004-session-revocation"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP1-AUTH-003",
                                            "assertion":  "注册/登录对未注册、已注册、已注销、suspended 邮箱静默切换流程"
                                        },
                                        {
                                            "family_id":  "TDD-WP1-AUTH-004",
                                            "assertion":  "验证码重用、过期仍有效或会话未及时撤销"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP1-AUTH-003",
                                                "assertion":  "六种状态严格按 PRD 分离入口；已注销邮箱只能新邀请重建且旧数据不恢复"
                                            },
                                            {
                                                "family_id":  "TDD-WP1-AUTH-004",
                                                "assertion":  "10 分钟一次性、60 秒重发、30 天会话；退出/暂停/注销/白名单移除立即撤销"
                                            }
                                        ],
                      "task_green_gate":  "六类身份状态不静默换流程；验证码不可复用；会话撤销即时生效；普通与管理员 audience 分离；登录页状态与布局证据齐全",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "API",
                                     "E2E",
                                     "DB"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm test:integration",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-003-entry-state-matrix/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-004-challenge-guards/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUTH-004-session-revocation/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-1",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "user-auth",
                                           "role":  "implementation",
                                           "frames":  [
                                                          {
                                                              "frame_id":  "Z0pf8",
                                                              "frame_name":  "01A 普通用户登录",
                                                              "primary_task":  "TASK-WP1-02",
                                                              "mapped_state_scope":  "登录正常；字段初始空；发码/登录加载；验证码、Resend 和身份状态失败；管理员入口、固定本机提示、艺术带与焦点"
                                                          },
                                                          {
                                                              "frame_id":  "DVPM8",
                                                              "frame_name":  "01B 注册展开态",
                                                              "primary_task":  "TASK-WP1-03",
                                                              "mapped_state_scope":  "邀请与邮箱已验证摘要；资料和告知未完成/完成；注册中；名额、邀请、验证码和提交失败；主动作禁用"
                                                          }
                                                      ],
                                           "applicable_states":  {
                                                                     "page_id":  "user-auth",
                                                                     "actor_entry":  "未登录普通入口",
                                                                     "normal":  "登录、分阶段注册、管理员文字入口、固定本机提示",
                                                                     "empty_loading":  "字段初始空；发码/验证/注册加载",
                                                                     "failure_disabled":  "Resend、验证码、邀请、名额、告知未完成；按钮禁用",
                                                                     "conflict_capacity_special":  "N/A：认证不消费存储容量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/user-auth/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP1-03",
                      "work_package":  "WP-1",
                      "title":  "注册展开态、内测告知与账号名额",
                      "dependencies":  {
                                           "source_text":  "TASK-WP1-01、TASK-WP1-02",
                                           "task_ids":  [
                                                            "TASK-WP1-01",
                                                            "TASK-WP1-02"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "AUTH-01",
                                           "AUTH-03",
                                           "NFR-04",
                                           "PRIV-04",
                                           "PRIV-06"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-01",
                                                  "AC-32",
                                                  "AC-41",
                                                  "AC-45",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "AUTH-01、NFR-04、AC-32、45",
                                                     "AUTH-03、PRIV-04、06、AC-01、41、56"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "6.3 鉴权与会话",
                                                        "9.1 邀请注册、验证码、会话和管理员",
                                                        "12.1 本机安全边界"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "web"
                                  ],
                      "implementation_boundary":  "实现版本化内测告知、必选确认、资料字段、active+suspended 普通账号 10 人上限、deleted 释放和 super_admin 不占名额；按 DVPM8 落实邀请/邮箱只读摘要、资料、告知和注册主动作",
                      "parent_families":  [
                                              "TDD-WP1-NOTICE-001",
                                              "TDD-WP1-SLOT-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP1-NOTICE-001-registration-consent",
                                       "TDD-WP1-SLOT-001-stage-limit"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP1-NOTICE-001",
                                            "assertion":  "未勾选、版本缺失或告知遗漏第三方/本机数据处理仍可注册"
                                        },
                                        {
                                            "family_id":  "TDD-WP1-SLOT-001",
                                            "assertion":  "suspended 不占名额、super_admin 占名额或第 11 人可注册"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP1-NOTICE-001",
                                                "assertion":  "告知含版本和生效日期，覆盖 AI 网关、Resend、高德、本机存储与无备份、管理员访问、DYN004、注销和 180 天规则；未同意不建号，成功时记录版本/时间"
                                            },
                                            {
                                                "family_id":  "TDD-WP1-SLOT-001",
                                                "assertion":  "active+suspended 普通账号最多 10；deleted 释放；super_admin 不占且不用邀请码"
                                            }
                                        ],
                      "task_green_gate":  "告知覆盖 PRD 固定事项；未同意不建号；第 11 个普通账号被阻断；多个同权限 super_admin 合法；注册展开态状态与布局证据齐全",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "API",
                                     "E2E",
                                     "MANUAL",
                                     "DB"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm test:integration",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-NOTICE-001-registration-consent/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-SLOT-001-stage-limit/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-1",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "user-auth",
                                           "role":  "implementation",
                                           "frames":  [
                                                          {
                                                              "frame_id":  "Z0pf8",
                                                              "frame_name":  "01A 普通用户登录",
                                                              "primary_task":  "TASK-WP1-02",
                                                              "mapped_state_scope":  "登录正常；字段初始空；发码/登录加载；验证码、Resend 和身份状态失败；管理员入口、固定本机提示、艺术带与焦点"
                                                          },
                                                          {
                                                              "frame_id":  "DVPM8",
                                                              "frame_name":  "01B 注册展开态",
                                                              "primary_task":  "TASK-WP1-03",
                                                              "mapped_state_scope":  "邀请与邮箱已验证摘要；资料和告知未完成/完成；注册中；名额、邀请、验证码和提交失败；主动作禁用"
                                                          }
                                                      ],
                                           "applicable_states":  {
                                                                     "page_id":  "user-auth",
                                                                     "actor_entry":  "未登录普通入口",
                                                                     "normal":  "登录、分阶段注册、管理员文字入口、固定本机提示",
                                                                     "empty_loading":  "字段初始空；发码/验证/注册加载",
                                                                     "failure_disabled":  "Resend、验证码、邀请、名额、告知未完成；按钮禁用",
                                                                     "conflict_capacity_special":  "N/A：认证不消费存储容量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/user-auth/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP1-04",
                      "work_package":  "WP-1",
                      "title":  "管理员白名单与安全配置生效",
                      "dependencies":  {
                                           "source_text":  "WP-0、TASK-WP1-01、TASK-WP1-02",
                                           "task_ids":  [
                                                            "TASK-WP1-01",
                                                            "TASK-WP1-02"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-09",
                                           "AUTH-07"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-49",
                                                  "AC-50"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "AUTH-07、AC-49",
                                                     "AUTH-07、ADMIN-09、AC-49、50"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "3.3 离线配置命令",
                                                        "6.3 鉴权与会话",
                                                        "9.1 邀请注册、验证码、会话和管理员"
                                                    ],
                      "modules":  [
                                      "supervisor",
                                      "api",
                                      "sqlite",
                                      "windows-credential-manager",
                                      "web-admin-auth"
                                  ],
                      "implementation_boundary":  "实现 HMAC 管理员白名单、独立管理员认证、多管理员、安全配置 revision、原子应用/回滚、system 审计和离线恢复边界",
                      "parent_families":  [
                                              "TDD-WP1-ADM-001",
                                              "TDD-WP1-CFG-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP1-ADM-001-admin-auth-boundary",
                                       "TDD-WP1-CFG-001-secure-revision"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP1-ADM-001",
                                            "assertion":  "白名单外发码、普通账号提升或全部管理员停用后自助恢复"
                                        },
                                        {
                                            "family_id":  "TDD-WP1-CFG-001",
                                            "assertion":  "安全配置修订部分生效或泄露白名单/HMAC"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP1-ADM-001",
                                                "assertion":  "后台独立 audience；多管理员可用；恢复仅安全配置；部署人员无产品身份"
                                            },
                                            {
                                                "family_id":  "TDD-WP1-CFG-001",
                                                "assertion":  "完整验证后单一事务生效、撤销会话、system 审计和 revision 推进；失败整体回滚"
                                            }
                                        ],
                      "task_green_gate":  "非白名单发码前拒绝；普通账号不能原地提升；配置失败不部分生效；部署人员不成为产品角色或审计 actor",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: supervisor, api, sqlite, windows-credential-manager, web-admin-auth.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "E2E",
                                     "PKG-SEC"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-ADM-001-admin-auth-boundary/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-CFG-001-secure-revision/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-1",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-auth",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP1-04",
                                                          "mapped_state_scope":  "白名单邮箱验证码、字段空/加载、非白名单、停用/移除、Resend 失败；独立 audience 与返回普通登录"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-auth",
                                                                     "actor_entry":  "未登录后台入口",
                                                                     "normal":  "白名单邮箱验证码、独立 audience、返回普通登录",
                                                                     "empty_loading":  "字段空；发码/登录中",
                                                                     "failure_disabled":  "非白名单发码前阻断、停用/移除白名单、Resend 错误",
                                                                     "conflict_capacity_special":  "N/A：不显示普通创作或容量业务"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-auth/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP1-05",
                      "work_package":  "WP-1",
                      "title":  "注销、匿名保留与物理清理",
                      "dependencies":  {
                                           "source_text":  "TASK-WP1-01 至 TASK-WP1-04",
                                           "task_ids":  [
                                                            "TASK-WP1-01",
                                                            "TASK-WP1-04"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "AUTH-06"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-22",
                                                  "AC-39",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.10",
                                                "17.11"
                                            ],
                      "requirement_ac_sources":  [
                                                     "AUTH-06、17.10、17.11、AC-22、39",
                                                     "AUTH-06、AC-22、39、56"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.2 项目、历史、失败草稿和回收站",
                                                        "12.2 账号注销"
                                                    ],
                      "modules":  [
                                      "api",
                                      "worker",
                                      "sqlite",
                                      "local-data-root",
                                      "web"
                                  ],
                      "implementation_boundary":  "实现注销事务、立即撤权与断链、邮箱释放、匿名事件、物理清理队列和最长 180 天保留",
                      "parent_families":  [
                                              "TDD-WP1-DEL-001",
                                              "TDD-WP1-DEL-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP1-DEL-001-account-delete",
                                       "TDD-WP1-DEL-002-anonymous-retention"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP1-DEL-001",
                                            "assertion":  "注销后仍可访问账号、项目、资源、坐标或会话"
                                        },
                                        {
                                            "family_id":  "TDD-WP1-DEL-002",
                                            "assertion":  "匿名事件可回溯或注销延长访问审计期限"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP1-DEL-001",
                                                "assertion":  "注销事务立即撤权和断链，物理内容异步清理，邮箱可作为全新账号重新注册"
                                            },
                                            {
                                                "family_id":  "TDD-WP1-DEL-002",
                                                "assertion":  "只保留允许字段和随机主体；匿名事件不晚于注销后 180 天；访问审计沿原 expires_at"
                                            }
                                        ],
                      "task_green_gate":  "旧数据不可恢复；原邮箱只能新邀请新建；匿名事件不可反查；注销不延长私有访问审计期限",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "WRK",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:worker",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-DEL-001-account-delete/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-DEL-002-anonymous-retention/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-1",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "settings",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "Ws5E0",
                                                          "frame_name":  "05B 设置与本机数据",
                                                          "primary_task":  "TASK-WP1-05",
                                                          "mapped_state_scope":  "资料、本机数据、容量摘要和固定文案；加载/保存失败；full/unavailable；注销确认、处理中和返回登录"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "settings",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "资料、本机数据、容量摘要、固定文案、注销",
                                                                     "empty_loading":  "资料/状态加载",
                                                                     "failure_disabled":  "保存失败；注销确认/处理中禁用重复提交",
                                                                     "conflict_capacity_special":  "full/unavailable 状态与允许动作；注销后返回登录"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/settings/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP1-06",
                      "work_package":  "WP-1",
                      "title":  "两类审计基础不可变性",
                      "dependencies":  {
                                           "source_text":  "WP-0、TASK-WP1-04、TASK-WP1-05",
                                           "task_ids":  [
                                                            "TASK-WP1-04",
                                                            "TASK-WP1-05"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-05",
                                           "ADMIN-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-50"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.10",
                                                "17.16"
                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-05、09、17.10、17.16、AC-50"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "5.2 十九个产品数据契约映射",
                                                        "5.3 支撑表",
                                                        "9.6 运营后台与两类审计",
                                                        "12.3 审计与敏感信息"
                                                    ],
                      "modules":  [
                                      "api",
                                      "worker",
                                      "sqlite"
                                  ],
                      "implementation_boundary":  "建立 AdminOperationLog 与 PrivateContentAccessLog 表、append-only trigger、合法 retention/privacy purge 作用域和非敏感摘要",
                      "parent_families":  [
                                              "TDD-WP1-AUD-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP1-AUD-001-immutable-triggers"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP1-AUD-001",
                                            "assertion":  "普通连接可改删两类审计"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP1-AUD-001",
                                                "assertion":  "trigger 阻断 UPDATE/DELETE；仅保留期/隐私清理作用域可执行规定删除"
                                            }
                                        ],
                      "task_green_gate":  "普通连接不能改删；两类日志不混用；正文、图片、密钥和路径不进入审计",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, worker, sqlite.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP1-AUD-001-immutable-triggers/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-1",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP2-01",
                      "work_package":  "WP-2",
                      "title":  "项目、历史、失败草稿与空工作台",
                      "dependencies":  {
                                           "source_text":  "WP-0、WP-1",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [
                                                                 "WP-0",
                                                                 "WP-1"
                                                             ]
                                       },
                      "requirements":  [
                                           "GEN-04",
                                           "GEN-09",
                                           "GEN-11",
                                           "PROJECT-01",
                                           "PROJECT-02",
                                           "PROJECT-03"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-03",
                                                  "AC-04",
                                                  "AC-06",
                                                  "AC-34",
                                                  "AC-43"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "PROJECT-01 至 03、GEN-04、11、AC-03、06、34",
                                                     "PROJECT-01、GEN-09、AC-04、43"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-PROJECT-ACTIVE-19",
                                          "FX-PROJECT-EMPTY"
                                      ],
                      "development_plan_sections":  [
                                                        "6.2 API 分组",
                                                        "9.2 项目、历史、失败草稿和回收站"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "web"
                                  ],
                      "implementation_boundary":  "实现新建项目、项目内追加、固定比例、20 active、10 成功图、默认命名/重命名、failed_empty 重试和批量入回收站；按 WbDYT 落实无项目工作台艺术带、生成表单和空任务区",
                      "parent_families":  [
                                              "TDD-WP2-PROJ-001",
                                              "TDD-WP2-PROJ-005"
                                          ],
                      "case_ids":  [
                                       "TDD-WP2-PROJ-001-new-versus-continue",
                                       "TDD-WP2-PROJ-005-failed-draft-retry"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP2-PROJ-001",
                                            "assertion":  "新建/继续生成/历史上限混淆项目数量或比例"
                                        },
                                        {
                                            "family_id":  "TDD-WP2-PROJ-005",
                                            "assertion":  "重试新建项目或成功项目混入 failed_empty 批量删除"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP2-PROJ-001",
                                                "assertion":  "每次“新建创作”新项目；继续生成只追加；比例固定；10 张历史阻断追加但不阻断新项目"
                                            },
                                            {
                                                "family_id":  "TDD-WP2-PROJ-005",
                                                "assertion":  "同一草稿每次重试只新增任务；仅无成功图草稿可批量入回收站"
                                            }
                                        ],
                      "task_green_gate":  "新建/追加/上限不混淆；重试只新建任务；有成功图项目不能进入 failed_empty 批量操作；艺术带仅在无项目工作台出现",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-001-new-versus-continue/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-005-failed-draft-retry/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-2",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "workspace",
                                           "role":  "implementation",
                                           "frames":  [
                                                          {
                                                              "frame_id":  "WbDYT",
                                                              "frame_name":  "02A 空工作台",
                                                              "primary_task":  "TASK-WP2-01",
                                                              "mapped_state_scope":  "无项目艺术带；生成表单、推荐模型、四比例与空任务；模型/项目加载；模型、点数、参考图和容量禁用"
                                                          },
                                                          {
                                                              "frame_id":  "d99Lo",
                                                              "frame_name":  "02B 生成中工作台",
                                                              "primary_task":  "TASK-WP2-05",
                                                              "mapped_state_scope":  "queued/running 无假百分比；冻结点数；critical 容量条；第二次提交禁用；失败/rejected 动作和配置变化重确认"
                                                          }
                                                      ],
                                           "applicable_states":  {
                                                                     "page_id":  "workspace",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "生成表单、模型/点数/比例、最近项目",
                                                                     "empty_loading":  "无项目艺术带；模型/项目加载",
                                                                     "failure_disabled":  "服务/参考图/生成错误；模型、点数、单任务、历史/项目上限禁用",
                                                                     "conflict_capacity_special":  "model config 变化重确认；warning/critical 提示；full/unavailable 阻断新增"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/workspace/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "projects",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "zXyG9",
                                                          "frame_name":  "03A 项目列表",
                                                          "primary_task":  "TASK-WP2-01",
                                                          "mapped_state_scope":  "active/trashed、筛选、多选 failed_empty；空/骨架；20 active、恢复/批量禁用；多标签和容量提示"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "projects",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "active/trashed 列表、筛选、多选 failed_empty",
                                                                     "empty_loading":  "无项目/筛选空；稳定卡片骨架",
                                                                     "failure_disabled":  "列表失败保留旧数据；20 active、恢复/批量条件禁用",
                                                                     "conflict_capacity_special":  "多标签版本提示；删除排队不乐观减容量；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/projects/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "project-detail",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "v2Qbu",
                                                          "frame_name":  "03B 项目详情",
                                                          "primary_task":  "TASK-WP2-01",
                                                          "mapped_state_scope":  "历史、固定比例、继续生成、编辑、原图/latest；无成功图/无成品；10 图上限、资源失败和容量状态"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "project-detail",
                                                                     "actor_entry":  "项目所有者",
                                                                     "normal":  "历史、固定比例、继续生成、编辑、原图/latest 下载",
                                                                     "empty_loading":  "无成功图草稿；历史/成品加载",
                                                                     "failure_disabled":  "10 图上限、当前底图不可删、无 latest、资源读取失败",
                                                                     "conflict_capacity_special":  "比例不可改；清理/容量状态不伪造资源可用性；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/project-detail/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP2-02",
                      "work_package":  "WP-2",
                      "title":  "自动保存与多标签冲突",
                      "dependencies":  {
                                           "source_text":  "TASK-WP2-01",
                                           "task_ids":  [
                                                            "TASK-WP2-01"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "EXPORT-05",
                                           "EXPORT-06",
                                           "PROJECT-04",
                                           "PROJECT-05",
                                           "PROJECT-06",
                                           "PROJECT-07"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-20",
                                                  "AC-35",
                                                  "AC-36"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.3"
                                            ],
                      "requirement_ac_sources":  [
                                                     "PROJECT-04、05、EXPORT-06、AC-20、35",
                                                     "PROJECT-04、06、AC-20",
                                                     "PROJECT-04、17.3、AC-20",
                                                     "PROJECT-07、AC-36 P0-A 子集",
                                                     "PROJECT-07、EXPORT-05、AC-36 P0-A 子集"
                                                 ],
                      "acceptance_scope_notes":  [
                                                     "PROJECT-07、AC-36 P0-A 子集",
                                                     "PROJECT-07、EXPORT-05、AC-36 P0-A 子集"
                                                 ],
                      "fixture_ids":  [
                                          "FX-PROJECT-CONFLICT"
                                      ],
                      "development_plan_sections":  [
                                                        "7.5 项目保存并发",
                                                        "9.2 项目、历史、失败草稿和回收站"
                                                    ],
                      "modules":  [
                                      "web",
                                      "api",
                                      "sqlite",
                                      "shared-contracts"
                                  ],
                      "implementation_boundary":  "实现 Dada Canvas Schema、1 秒 debounce、单请求在途、最新快照合并、If-Match CAS、dirty/saving/saved/failed/conflicted、离开守卫和一次冲突本地导出",
                      "parent_families":  [
                                              "TDD-WP2-PROJ-002",
                                              "TDD-WP2-PROJ-004"
                                          ],
                      "case_ids":  [
                                       "TDD-WP2-PROJ-002-cas-success",
                                       "TDD-WP2-PROJ-002-debounce",
                                       "TDD-WP2-PROJ-002-save-failure-recovery",
                                       "TDD-WP2-PROJ-004-conflict-export-once",
                                       "TDD-WP2-PROJ-004-stale-tab"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP2-PROJ-002",
                                            "assertion":  "连续编辑并发保存、失败显示已保存或刷新恢复私有草稿"
                                        },
                                        {
                                            "family_id":  "TDD-WP2-PROJ-004",
                                            "assertion":  "旧标签覆盖、另存副本或多次冲突导出"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP2-PROJ-002",
                                                "assertion":  "1 秒 debounce、单请求在途、最新快照合并；失败重试；强制退出只恢复 saved，撤销栈为空"
                                            },
                                            {
                                                "family_id":  "TDD-WP2-PROJ-004",
                                                "assertion":  "CAS 返回 412；旧页只读；仅一次本地导出且不写 latest；刷新后端最新状态"
                                            }
                                        ],
                      "task_green_gate":  "旧标签不能覆盖或另存副本；冲突页只读且仅一次本地导出，不写 latest；刷新只恢复 saved",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web, api, sqlite, shared-contracts.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-002-cas-success/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-002-debounce/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-002-save-failure-recovery/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-004-conflict-export-once/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-004-stale-tab/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-2",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "projects",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "zXyG9",
                                                          "frame_name":  "03A 项目列表",
                                                          "primary_task":  "TASK-WP2-01",
                                                          "mapped_state_scope":  "active/trashed、筛选、多选 failed_empty；空/骨架；20 active、恢复/批量禁用；多标签和容量提示"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "projects",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "active/trashed 列表、筛选、多选 failed_empty",
                                                                     "empty_loading":  "无项目/筛选空；稳定卡片骨架",
                                                                     "failure_disabled":  "列表失败保留旧数据；20 active、恢复/批量条件禁用",
                                                                     "conflict_capacity_special":  "多标签版本提示；删除排队不乐观减容量；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/projects/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP2-03",
                      "work_package":  "WP-2",
                      "title":  "回收站、恢复与 purge",
                      "dependencies":  {
                                           "source_text":  "TASK-WP2-01、WP-0 文件清理",
                                           "task_ids":  [
                                                            "TASK-WP2-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "PROJECT-03",
                                           "PROJECT-08"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-21"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "PROJECT-03、08、AC-21"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-PROJECT-ACTIVE-20"
                                      ],
                      "development_plan_sections":  [
                                                        "9.2 项目、历史、失败草稿和回收站",
                                                        "12.2 账号注销"
                                                    ],
                      "modules":  [
                                      "api",
                                      "worker",
                                      "sqlite",
                                      "local-data-root",
                                      "web"
                                  ],
                      "implementation_boundary":  "实现 trashed、精确 +720h purge_at、20 active 恢复限制、立即撤权和异步物理清理",
                      "parent_families":  [
                                              "TDD-WP2-PROJ-003"
                                          ],
                      "case_ids":  [
                                       "TDD-WP2-PROJ-003-trash-restore-purge"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP2-PROJ-003",
                                            "assertion":  "回收站计时、20 项目恢复或 purge 可恢复边界错误"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP2-PROJ-003",
                                                "assertion":  "purge_at 精确 +720 小时；满 20 保持 trashed；purged 立即不可访问并异步清理"
                                            }
                                        ],
                      "task_green_gate":  "满 20 时保持 trashed；purged 后立即不可读；删除排队不伪造容量下降",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "WRK",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:worker",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-PROJ-003-trash-restore-purge/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-2",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "projects",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "zXyG9",
                                                          "frame_name":  "03A 项目列表",
                                                          "primary_task":  "TASK-WP2-01",
                                                          "mapped_state_scope":  "active/trashed、筛选、多选 failed_empty；空/骨架；20 active、恢复/批量禁用；多标签和容量提示"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "projects",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "active/trashed 列表、筛选、多选 failed_empty",
                                                                     "empty_loading":  "无项目/筛选空；稳定卡片骨架",
                                                                     "failure_disabled":  "列表失败保留旧数据；20 active、恢复/批量条件禁用",
                                                                     "conflict_capacity_special":  "多标签版本提示；删除排队不乐观减容量；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/projects/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "project-detail",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "v2Qbu",
                                                          "frame_name":  "03B 项目详情",
                                                          "primary_task":  "TASK-WP2-01",
                                                          "mapped_state_scope":  "历史、固定比例、继续生成、编辑、原图/latest；无成功图/无成品；10 图上限、资源失败和容量状态"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "project-detail",
                                                                     "actor_entry":  "项目所有者",
                                                                     "normal":  "历史、固定比例、继续生成、编辑、原图/latest 下载",
                                                                     "empty_loading":  "无成功图草稿；历史/成品加载",
                                                                     "failure_disabled":  "10 图上限、当前底图不可删、无 latest、资源读取失败",
                                                                     "conflict_capacity_special":  "比例不可改；清理/容量状态不伪造资源可用性；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/project-detail/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP2-04",
                      "work_package":  "WP-2",
                      "title":  "点数账户、流水与管理员调点",
                      "dependencies":  {
                                           "source_text":  "WP-1、WP-0 SQLite",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [
                                                                 "WP-0",
                                                                 "WP-1"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-01",
                                           "ADMIN-09",
                                           "CREDIT-01",
                                           "CREDIT-02",
                                           "CREDIT-03",
                                           "CREDIT-04",
                                           "CREDIT-05",
                                           "CREDIT-06",
                                           "GEN-09",
                                           "GEN-10"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-03",
                                                  "AC-04",
                                                  "AC-28",
                                                  "AC-29",
                                                  "AC-50"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "CREDIT-01 至 05、AC-03",
                                                     "CREDIT-03、05、GEN-09、10、AC-03、04、29",
                                                     "CREDIT-04、AC-28",
                                                     "CREDIT-05、06、ADMIN-01、09、AC-29、50"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-ACTOR-ADMIN-A",
                                          "FX-CREDIT-ENOUGH",
                                          "FX-CREDIT-INSUFFICIENT",
                                          "FX-JOB-ACTIVE",
                                          "FX-MODEL-VERIFIED"
                                      ],
                      "development_plan_sections":  [
                                                        "7.3 生成提交事务",
                                                        "7.4 结算事务",
                                                        "9.6 运营后台与两类审计"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "web-admin"
                                  ],
                      "implementation_boundary":  "实现 available/reserved、reserve/commit/release、不可变 ledger、operation_key、余额不足和带原因的 admin adjustment",
                      "parent_families":  [
                                              "TDD-WP2-CRED-001",
                                              "TDD-WP2-CRED-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP2-CRED-001-finalize-once",
                                       "TDD-WP2-CRED-001-insufficient",
                                       "TDD-WP2-CRED-001-reserve",
                                       "TDD-WP2-CRED-002-admin-adjustment"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP2-CRED-001",
                                            "assertion":  "点数不足、重复结算或生成流程制造负数"
                                        },
                                        {
                                            "family_id":  "TDD-WP2-CRED-002",
                                            "assertion":  "管理员调点修改 reserved 或缺原因/审计"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP2-CRED-001",
                                                "assertion":  "不足不建任务/流水/上游；reserve/commit/release 各一次；生成流程 available 不为负"
                                            },
                                            {
                                                "family_id":  "TDD-WP2-CRED-002",
                                                "assertion":  "只改 available，可为负；原因、流水和 AdminOperationLog 同事务"
                                            }
                                        ],
                      "task_green_gate":  "生成流程 available 不为负；结算一次；调点只改 available、可为负，reserved 不变，流水和审计同事务",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, web-admin.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "WRK",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:worker",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-CRED-001-finalize-once/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-CRED-001-insufficient/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-CRED-001-reserve/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-CRED-002-admin-adjustment/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-2",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "credits",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "YlKzE",
                                                          "frame_name":  "05A 点数明细",
                                                          "primary_task":  "TASK-WP2-04",
                                                          "mapped_state_scope":  "available/reserved、流水和分页；无流水/加载；失败保留安全摘要；负 available 如实显示且无购买入口"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "credits",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "available/reserved、流水、关联与时间",
                                                                     "empty_loading":  "无流水；分页加载",
                                                                     "failure_disabled":  "加载失败保留安全余额摘要",
                                                                     "conflict_capacity_special":  "负 available 如实显示；无购买/充值入口；页面操作不消费容量但仍继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/credits/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-users",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "脱敏列表/详情、暂停恢复/调点、空/筛选空/骨架、原因缺失和状态禁用、负 available"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-users",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "脱敏列表/详情、暂停恢复、调点",
                                                                     "empty_loading":  "无用户/筛选空；表格骨架",
                                                                     "failure_disabled":  "操作失败、原因缺失、状态前置禁用",
                                                                     "conflict_capacity_special":  "调点可使 available 为负但 reserved 不变；页面操作不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-users/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP2-05",
                      "work_package":  "WP-2",
                      "title":  "生成提交、单任务、参考图与生成中工作台",
                      "dependencies":  {
                                           "source_text":  "TASK-WP2-01、TASK-WP2-04、WP-0 存储",
                                           "task_ids":  [
                                                            "TASK-WP2-01",
                                                            "TASK-WP2-04"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-03",
                                           "CREDIT-03",
                                           "GEN-01",
                                           "GEN-02",
                                           "GEN-03",
                                           "GEN-04",
                                           "GEN-05",
                                           "GEN-06",
                                           "GEN-07",
                                           "GEN-08",
                                           "GEN-15",
                                           "PROJECT-01",
                                           "PROJECT-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-03",
                                                  "AC-05",
                                                  "AC-29",
                                                  "AC-30",
                                                  "AC-34",
                                                  "AC-44",
                                                  "AC-48"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "CREDIT-03、GEN-07、AC-05、29",
                                                     "GEN-01 至 08、PROJECT-01、AC-03、34、44",
                                                     "GEN-05、PROJECT-09、AC-44、48",
                                                     "GEN-15、ADMIN-03、AC-30"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-CREDIT-ENOUGH",
                                          "FX-MODEL-VERIFIED",
                                          "FX-REF-VALID"
                                      ],
                      "development_plan_sections":  [
                                                        "6.2 API 分组",
                                                        "7.1 幂等规则",
                                                        "7.2 单任务约束",
                                                        "7.3 生成提交事务",
                                                        "9.2 项目、历史、失败草稿和回收站"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "local-data-root",
                                      "web",
                                      "worker"
                                  ],
                      "implementation_boundary":  "实现 multipart 提交、config/cost 复核、BEGIN IMMEDIATE、活动任务部分唯一索引、参考图内存态/流式提交/关系快照、幂等和 412 重确认；按 d99Lo 落实生成中工作台、当前任务、冻结点数、critical 容量条和禁用提交",
                      "parent_families":  [
                                              "TDD-WP2-GEN-001",
                                              "TDD-WP2-GEN-003",
                                              "TDD-WP2-REF-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP2-GEN-001-concurrent-reserve",
                                       "TDD-WP2-GEN-001-submit-snapshot",
                                       "TDD-WP2-GEN-003-stale-config",
                                       "TDD-WP2-REF-001-reference-lifecycle"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP2-GEN-001",
                                            "assertion":  "并发提交创建两个任务、项目、参考关系或冻结"
                                        },
                                        {
                                            "family_id":  "TDD-WP2-GEN-003",
                                            "assertion":  "旧 model_config_version 静默按新成本或限制提交"
                                        },
                                        {
                                            "family_id":  "TDD-WP2-REF-001",
                                            "assertion":  "未提交参考图被持久化或重试覆盖旧关系"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP2-GEN-001",
                                                "assertion":  "BEGIN IMMEDIATE+部分唯一索引只保留一个 queued/running；后续返回当前任务"
                                            },
                                            {
                                                "family_id":  "TDD-WP2-GEN-003",
                                                "assertion":  "返回 412、最新摘要；不建任务、不上传引用、不冻结、不调用上游；重新确认后才提交"
                                            },
                                            {
                                                "family_id":  "TDD-WP2-REF-001",
                                                "assertion":  "提交前只在内存；每个任务保存独立关系快照；purged 后立即不可读并异步删除"
                                            }
                                        ],
                      "task_green_gate":  "同账号只建一个活动任务；第二提交返回当前任务且不建项目/关系/冻结；过期配置和无效参考图零持久副作用；生成中页面不显示假进度且提交动作按状态禁用",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, local-data-root, web, worker.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-GEN-001-concurrent-reserve/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-GEN-001-submit-snapshot/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-GEN-003-stale-config/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-REF-001-reference-lifecycle/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-2",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "workspace",
                                           "role":  "implementation",
                                           "frames":  [
                                                          {
                                                              "frame_id":  "WbDYT",
                                                              "frame_name":  "02A 空工作台",
                                                              "primary_task":  "TASK-WP2-01",
                                                              "mapped_state_scope":  "无项目艺术带；生成表单、推荐模型、四比例与空任务；模型/项目加载；模型、点数、参考图和容量禁用"
                                                          },
                                                          {
                                                              "frame_id":  "d99Lo",
                                                              "frame_name":  "02B 生成中工作台",
                                                              "primary_task":  "TASK-WP2-05",
                                                              "mapped_state_scope":  "queued/running 无假百分比；冻结点数；critical 容量条；第二次提交禁用；失败/rejected 动作和配置变化重确认"
                                                          }
                                                      ],
                                           "applicable_states":  {
                                                                     "page_id":  "workspace",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "生成表单、模型/点数/比例、最近项目",
                                                                     "empty_loading":  "无项目艺术带；模型/项目加载",
                                                                     "failure_disabled":  "服务/参考图/生成错误；模型、点数、单任务、历史/项目上限禁用",
                                                                     "conflict_capacity_special":  "model config 变化重确认；warning/critical 提示；full/unavailable 阻断新增"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/workspace/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "current-task",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "d99Lo",
                                                          "frame_name":  "02B 生成中工作台",
                                                          "primary_task":  "TASK-WP2-05",
                                                          "mapped_state_scope":  "queued/running 无假百分比；冻结点数；critical 容量条；第二次提交禁用；失败/rejected 动作和配置变化重确认"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "current-task",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "真实状态、结果入口",
                                                                     "empty_loading":  "无活动任务；queued/running 无假百分比",
                                                                     "failure_disabled":  "failed/rejected 与九类固定动作；第二任务禁用",
                                                                     "conflict_capacity_special":  "storage 错误按任务真相；pending_manual_review 不作为用户任务状态；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/current-task/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP2-06",
                      "work_package":  "WP-2",
                      "title":  "任务终态、九类错误与网关余额影响",
                      "dependencies":  {
                                           "source_text":  "TASK-WP2-04、TASK-WP2-05；WP-3 Adapter 接口 mock",
                                           "task_ids":  [
                                                            "TASK-WP2-04",
                                                            "TASK-WP2-05"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-3"
                                                             ]
                                       },
                      "requirements":  [
                                           "CREDIT-03",
                                           "GEN-05",
                                           "GEN-06",
                                           "GEN-07",
                                           "GEN-08",
                                           "GEN-09",
                                           "GEN-10",
                                           "GEN-11",
                                           "GEN-13",
                                           "GEN-14",
                                           "GEN-15",
                                           "GEN-16"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-03",
                                                  "AC-04",
                                                  "AC-30",
                                                  "AC-40",
                                                  "AC-44",
                                                  "AC-51",
                                                  "AC-53"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.17",
                                                "17.18"
                                            ],
                      "requirement_ac_sources":  [
                                                     "GEN-05、16、17.18、AC-04、44、53",
                                                     "GEN-06、08、11、CREDIT-03、AC-03",
                                                     "GEN-07、16、17.18、AC-30、53",
                                                     "GEN-09、16、17.18、AC-04、53",
                                                     "GEN-10、16、17.18、AC-04、53",
                                                     "GEN-13、16、17.18、AC-40、53",
                                                     "GEN-14、15、17.17、AC-04、51",
                                                     "GEN-15、16、17.17、17.18、AC-40、51、53"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-GATEWAY-SYNC"
                                      ],
                      "development_plan_sections":  [
                                                        "7.4 结算事务",
                                                        "8.5 九类错误统一路径",
                                                        "11.3 AI 网关余额"
                                                    ],
                      "modules":  [
                                      "api",
                                      "worker",
                                      "sqlite",
                                      "ai-adapter-contract",
                                      "web"
                                  ],
                      "implementation_boundary":  "实现成功/失败/rejected、输出落盘与一次结算、固定九类错误、用户动作、GatewayBalanceState model/account/unknown 影响和 pending_manual_review",
                      "parent_families":  [
                                              "TDD-WP2-BAL-001",
                                              "TDD-WP2-ERR-001",
                                              "TDD-WP2-GEN-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP2-BAL-001-balance-impact",
                                       "TDD-WP2-ERR-001-gateway-balance",
                                       "TDD-WP2-ERR-001-gateway-contract",
                                       "TDD-WP2-ERR-001-model-disabled",
                                       "TDD-WP2-ERR-001-reference-invalid",
                                       "TDD-WP2-ERR-001-safety-rejected",
                                       "TDD-WP2-ERR-001-unknown-non-retryable",
                                       "TDD-WP2-ERR-001-unknown-retryable",
                                       "TDD-WP2-ERR-001-upstream-failed",
                                       "TDD-WP2-ERR-001-upstream-timeout",
                                       "TDD-WP2-GEN-002-success"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP2-BAL-001",
                                            "assertion":  "模型/账户/未知余额影响改写配置或重复释放"
                                        },
                                        {
                                            "family_id":  "TDD-WP2-ERR-001",
                                            "assertion":  "九类错误被新增、归并、泄露原文或错误处理点数"
                                        },
                                        {
                                            "family_id":  "TDD-WP2-GEN-002",
                                            "assertion":  "成功/失败/拒绝与点数、项目历史或重试不一致"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP2-BAL-001",
                                                "assertion":  "按影响范围只改 runtime；只 release 一次；未确认恢复前不可恢复"
                                            },
                                            {
                                                "family_id":  "TDD-WP2-ERR-001",
                                                "assertion":  "三模型统一固定 category；提交前无任务，提交后只 release 一次；状态和用户动作符合第 9 节"
                                            },
                                            {
                                                "family_id":  "TDD-WP2-GEN-002",
                                                "assertion":  "成功一图并 commit；失败/rejected 无输出并 release；重试同项目新任务"
                                            }
                                        ],
                      "task_green_gate":  "reference_invalid 与 safety_rejected 分离；供应商原文不泄露；runtime 变化不回写 ModelConfig；用户点数只释放一次",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, ai-adapter-contract, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "WRK",
                                     "UNIT",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:worker",
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-BAL-001-balance-impact/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-gateway-balance/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-gateway-contract/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-model-disabled/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-reference-invalid/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-safety-rejected/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-unknown-non-retryable/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-unknown-retryable/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-upstream-failed/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-ERR-001-upstream-timeout/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-GEN-002-success/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-2",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "current-task",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "d99Lo",
                                                          "frame_name":  "02B 生成中工作台",
                                                          "primary_task":  "TASK-WP2-05",
                                                          "mapped_state_scope":  "queued/running 无假百分比；冻结点数；critical 容量条；第二次提交禁用；失败/rejected 动作和配置变化重确认"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "current-task",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "真实状态、结果入口",
                                                                     "empty_loading":  "无活动任务；queued/running 无假百分比",
                                                                     "failure_disabled":  "failed/rejected 与九类固定动作；第二任务禁用",
                                                                     "conflict_capacity_special":  "storage 错误按任务真相；pending_manual_review 不作为用户任务状态；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/current-task/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP2-07",
                      "work_package":  "WP-2",
                      "title":  "原图与 latest export 服务",
                      "dependencies":  {
                                           "source_text":  "TASK-WP2-01、TASK-WP2-02、WP-0 存储",
                                           "task_ids":  [
                                                            "TASK-WP2-01",
                                                            "TASK-WP2-02"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "EXPORT-04",
                                           "EXPORT-05",
                                           "EXPORT-06"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-23",
                                                  "AC-35",
                                                  "AC-38",
                                                  "AC-55"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "EXPORT-04、AC-23、35",
                                                     "EXPORT-04、AC-23、38 P0-A 子集",
                                                     "EXPORT-05、06、AC-35、55"
                                                 ],
                      "acceptance_scope_notes":  [
                                                     "EXPORT-04、AC-23、38 P0-A 子集"
                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "6.2 API 分组",
                                                        "9.5 客户端导出与 latest exports"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "local-data-root",
                                      "web"
                                  ],
                      "implementation_boundary":  "实现历史原图下载、latest JPG/PNG 资源关系、同 Blob 上传、后端失败矩阵和无导出成品空态",
                      "parent_families":  [
                                              "TDD-WP2-EXP-001",
                                              "TDD-WP2-EXP-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP2-EXP-001-result-matrix",
                                       "TDD-WP2-EXP-001-same-blob-success",
                                       "TDD-WP2-EXP-002-empty-latest"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP2-EXP-001",
                                            "assertion":  "项目/成品保存失败撤回下载或覆盖旧 latest"
                                        },
                                        {
                                            "family_id":  "TDD-WP2-EXP-002",
                                            "assertion":  "从未导出项目自动生成默认成品"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP2-EXP-001",
                                                "assertion":  "同一次 Blob 用于下载和上传；下载可成功、latest 保持旧值；刷新只恢复 saved"
                                            },
                                            {
                                                "family_id":  "TDD-WP2-EXP-002",
                                                "assertion":  "显示“暂无导出成品”，只提供进入编辑导出和下载原图"
                                            }
                                        ],
                      "task_green_gate":  "客户端下载与后端保存结果独立；失败保留旧 latest；从未导出不自动合成；不承诺跨设备下载",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, local-data-root, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-EXP-001-result-matrix/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-EXP-001-same-blob-success/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP2-EXP-002-empty-latest/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-2",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "project-detail",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "v2Qbu",
                                                          "frame_name":  "03B 项目详情",
                                                          "primary_task":  "TASK-WP2-01",
                                                          "mapped_state_scope":  "历史、固定比例、继续生成、编辑、原图/latest；无成功图/无成品；10 图上限、资源失败和容量状态"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "project-detail",
                                                                     "actor_entry":  "项目所有者",
                                                                     "normal":  "历史、固定比例、继续生成、编辑、原图/latest 下载",
                                                                     "empty_loading":  "无成功图草稿；历史/成品加载",
                                                                     "failure_disabled":  "10 图上限、当前底图不可删、无 latest、资源读取失败",
                                                                     "conflict_capacity_special":  "比例不可改；清理/容量状态不伪造资源可用性；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/project-detail/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "export",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "i9upg7",
                                                          "frame_name":  "04B 导出弹层",
                                                          "primary_task":  "TASK-WP4-05",
                                                          "mapped_state_scope":  "JPG/PNG、质量、尺寸；合成/持久化加载；未提交确认；四类失败结果；冲突一次下载和 full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "export",
                                                                     "actor_entry":  "编辑器内项目所有者",
                                                                     "normal":  "JPG/PNG、质量、尺寸、下载/latest 分结果",
                                                                     "empty_loading":  "合成/持久化加载；无业务空态",
                                                                     "failure_disabled":  "合成、下载、项目保存、latest 保存分别失败；无画布/冲突次数用尽禁用",
                                                                     "conflict_capacity_special":  "未提交确认；conflicted 仅一次本地导出；full/unavailable 后端失败不撤回下载"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/export/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP3-01",
                      "work_package":  "WP-3",
                      "title":  "ModelConfig 集合与原子替换",
                      "dependencies":  {
                                           "source_text":  "WP-2",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [
                                                                 "WP-2"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-03",
                                           "GEN-01",
                                           "GEN-13",
                                           "GEN-15"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-30",
                                                  "AC-40"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.2"
                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-03、17.2、AC-30",
                                                     "ADMIN-03、AC-30",
                                                     "GEN-01、ADMIN-03、17.2、AC-30",
                                                     "GEN-13、15、ADMIN-03、AC-30、40"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-MODEL-SEED",
                                          "FX-MODEL-VERIFIED"
                                      ],
                      "development_plan_sections":  [
                                                        "7.6 ModelConfig 原子配置与运行时推荐"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "web-admin",
                                      "shared-contracts"
                                  ],
                      "implementation_boundary":  "实现三模型固定 seed、immutable config_version/config_set、恰好一个 enabled default、唯一正整数 priority、完整集合 CAS、替代默认错误和审计",
                      "parent_families":  [
                                              "TDD-WP3-MDL-001",
                                              "TDD-WP3-MDL-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP3-MDL-001-seed-read",
                                       "TDD-WP3-MDL-002-cas-conflict",
                                       "TDD-WP3-MDL-002-contract-change",
                                       "TDD-WP3-MDL-002-invalid-set",
                                       "TDD-WP3-MDL-002-replace-default"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP3-MDL-001",
                                            "assertion":  "初始集合零/多默认、优先级非法或 runtime 假装 verified"
                                        },
                                        {
                                            "family_id":  "TDD-WP3-MDL-002",
                                            "assertion":  "停用默认、重复优先级或 CAS 冲突产生部分配置"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP3-MDL-001",
                                                "assertion":  "三模型固定 seed；一个 enabled default；priority 1/2/3；contract unverified 时 runtime 不可用"
                                            },
                                            {
                                                "family_id":  "TDD-WP3-MDL-002",
                                                "assertion":  "完整三模型集合原子校验和切换；失败原集合、runtime 和审计结果符合协议"
                                            }
                                        ],
                      "task_green_gate":  "初始 1/2/3 优先级；缺失/非正/重复/零或多默认整批拒绝；切换无可见中间态；失败原集合不变",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, web-admin, shared-contracts.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "UNIT",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-001-seed-read/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-002-cas-conflict/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-002-contract-change/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-002-invalid-set/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-002-replace-default/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-3",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-models",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "YVfVG",
                                                          "frame_name":  "06B 模型配置",
                                                          "primary_task":  "TASK-WP6-05",
                                                          "mapped_state_scope":  "完整三模型集合、default/runtime/recommended；加载；空推荐；替代/priority 禁用；CAS 冲突和整套回滚"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-models",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "完整三模型集合、default/runtime/recommended 三层",
                                                                     "empty_loading":  "初始加载骨架；无 recommended 是合法状态",
                                                                     "failure_disabled":  "合法替代/priority 前置禁用；契约未验证/运行时不可用",
                                                                     "conflict_capacity_special":  "config_set CAS 冲突、完整集合原子回滚；仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-models/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP3-02",
                      "work_package":  "WP-3",
                      "title":  "独立 runtime 与推荐模型",
                      "dependencies":  {
                                           "source_text":  "TASK-WP3-01、WP-2 余额状态",
                                           "task_ids":  [
                                                            "TASK-WP3-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-2"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-03",
                                           "ADMIN-09",
                                           "GEN-14",
                                           "GEN-15"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-30",
                                                  "AC-51"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.2"
                                            ],
                      "requirement_ac_sources":  [
                                                     "GEN-14、15、ADMIN-09、AC-51",
                                                     "GEN-15、ADMIN-03、17.2、AC-30、51"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "7.6 ModelConfig 原子配置与运行时推荐",
                                                        "11.3 AI 网关余额"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "web",
                                      "web-admin"
                                  ],
                      "implementation_boundary":  "实现 runtime reason/version、configured default/runtime/recommended 三层读取、空推荐、人工恢复和余额影响审计",
                      "parent_families":  [
                                              "TDD-WP3-BAL-001",
                                              "TDD-WP3-MDL-003"
                                          ],
                      "case_ids":  [
                                       "TDD-WP3-BAL-001-confirmed-recovery",
                                       "TDD-WP3-MDL-003-runtime-recommendation"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP3-BAL-001",
                                            "assertion":  "余额恢复自动执行或成本核对补扣用户点数"
                                        },
                                        {
                                            "family_id":  "TDD-WP3-MDL-003",
                                            "assertion":  "runtime 降级改变 enabled/default/priority 或推荐为空时写回配置"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP3-BAL-001",
                                                "assertion":  "model/account/unknown 影响正确；人工确认恢复并审计；成本核对不改任务终态或用户点数"
                                            },
                                            {
                                                "family_id":  "TDD-WP3-MDL-003",
                                                "assertion":  "配置字段不变；推荐只从可用候选按 priority 派生，可为 null"
                                            }
                                        ],
                      "task_green_gate":  "降级/恢复不改 enabled/default/priority；推荐只从可用候选派生；成本核对不补扣用户点数",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, web, web-admin.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "WRK",
                                     "E2E",
                                     "UNIT",
                                     "API"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:worker",
                                                  "pnpm test:e2e",
                                                  "pnpm test:unit",
                                                  "pnpm test:api",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-BAL-001-confirmed-recovery/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-MDL-003-runtime-recommendation/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-3",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-models",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "YVfVG",
                                                          "frame_name":  "06B 模型配置",
                                                          "primary_task":  "TASK-WP6-05",
                                                          "mapped_state_scope":  "完整三模型集合、default/runtime/recommended；加载；空推荐；替代/priority 禁用；CAS 冲突和整套回滚"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-models",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "完整三模型集合、default/runtime/recommended 三层",
                                                                     "empty_loading":  "初始加载骨架；无 recommended 是合法状态",
                                                                     "failure_disabled":  "合法替代/priority 前置禁用；契约未验证/运行时不可用",
                                                                     "conflict_capacity_special":  "config_set CAS 冲突、完整集合原子回滚；仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-models/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP3-03",
                      "work_package":  "WP-3",
                      "title":  "三个独立 Adapter 与契约证据",
                      "dependencies":  {
                                           "source_text":  "TASK-WP3-01、WP-2 Generation 接口",
                                           "task_ids":  [
                                                            "TASK-WP3-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-2"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-03",
                                           "GEN-01",
                                           "GEN-02",
                                           "GEN-05",
                                           "GEN-06",
                                           "GEN-13",
                                           "GEN-15",
                                           "GEN-16"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-30",
                                                  "AC-40"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "GEN-01、02、05、06、13、16、AC-40",
                                                     "GEN-13、15、ADMIN-03、AC-30、40"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "8.2 固定 Adapter 接口",
                                                        "8.3 契约验证证据",
                                                        "8.5 九类错误统一路径"
                                                    ],
                      "modules":  [
                                      "worker",
                                      "ai-adapter-gemini-flash",
                                      "ai-adapter-gemini-pro",
                                      "ai-adapter-gpt-image",
                                      "shared-contracts"
                                  ],
                      "implementation_boundary":  "分别实现三个 Adapter、纯文字/参考图/四比例、同步/异步、响应、一图、错误映射；配置字段变化令对应模型 unverified；提供 mock 和受控真实验证",
                      "parent_families":  [
                                              "TDD-WP3-ADP-001",
                                              "TDD-WP3-ADP-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP3-ADP-001-per-model-contract",
                                       "TDD-WP3-ADP-002-invalidate-revalidate"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP3-ADP-001",
                                            "assertion":  "一个模型 fixture 被复用于另两个模型或静默接受多图"
                                        },
                                        {
                                            "family_id":  "TDD-WP3-ADP-002",
                                            "assertion":  "契约字段变化后仍为 verified"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP3-ADP-001",
                                                "assertion":  "三个独立 Adapter 分别验证纯文字、参考图、四比例、同步/异步、响应和一图约束"
                                            },
                                            {
                                                "family_id":  "TDD-WP3-ADP-002",
                                                "assertion":  "端点、字段、参考图、响应、异步查询或错误协议任一变化立即 unverified，完整重验后才恢复"
                                            }
                                        ],
                      "task_green_gate":  "三模型 fixture/证据不得共用；完整重验前不可恢复 verified；真实证据未齐时任务保持 externally_blocked",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: worker, ai-adapter-gemini-flash, ai-adapter-gemini-pro, ai-adapter-gpt-image, shared-contracts.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "EXT-MOCK",
                                     "EXT-REAL",
                                     "DB"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:all",
                                                  "pnpm test:integration",
                                                  "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gemini-3.1-flash-image-preview",
                                                  "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gemini-3-pro-image-preview",
                                                  "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gpt-image-2",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-ADP-001-per-model-contract/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-ADP-002-invalidate-revalidate/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "controlled_real"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-3",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP3-04",
                      "work_package":  "WP-3",
                      "title":  "Worker 租约、崩溃恢复与结算接线",
                      "dependencies":  {
                                           "source_text":  "TASK-WP3-03、TASK-WP2-06",
                                           "task_ids":  [
                                                            "TASK-WP2-06",
                                                            "TASK-WP3-03"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "CREDIT-03",
                                           "GEN-08",
                                           "GEN-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-04",
                                                  "AC-51"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "GEN-08、09、CREDIT-03、AC-04、51"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-GATEWAY-ASYNC",
                                          "FX-GATEWAY-UNKNOWN"
                                      ],
                      "development_plan_sections":  [
                                                        "8.1 持久队列",
                                                        "8.4 崩溃恢复"
                                                    ],
                      "modules":  [
                                      "worker",
                                      "sqlite",
                                      "api"
                                  ],
                      "implementation_boundary":  "实现领取、租约、心跳、poll、崩溃恢复、无安全引用的 unknown_retryable、一次 release 和人工成本核对",
                      "parent_families":  [
                                              "TDD-WP3-WRK-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP3-WRK-001-recovery"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP3-WRK-001",
                                            "assertion":  "Worker 崩溃后重新 submit、重复结算或丢任务"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP3-WRK-001",
                                                "assertion":  "租约/心跳；有引用只 poll；无安全引用则 unknown_retryable+release+pending_manual_review"
                                            }
                                        ],
                      "task_green_gate":  "有上游引用只 poll、不重新 submit；未知结果终止用户任务且不双结算；Worker degraded 禁止新任务",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: worker, sqlite, api.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "WRK"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:worker",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP3-WRK-001-recovery/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-3",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "current-task",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "d99Lo",
                                                          "frame_name":  "02B 生成中工作台",
                                                          "primary_task":  "TASK-WP2-05",
                                                          "mapped_state_scope":  "queued/running 无假百分比；冻结点数；critical 容量条；第二次提交禁用；失败/rejected 动作和配置变化重确认"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "current-task",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "真实状态、结果入口",
                                                                     "empty_loading":  "无活动任务；queued/running 无假百分比",
                                                                     "failure_disabled":  "failed/rejected 与九类固定动作；第二任务禁用",
                                                                     "conflict_capacity_special":  "storage 错误按任务真相；pending_manual_review 不作为用户任务状态；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/current-task/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP4-01",
                      "work_package":  "WP-4",
                      "title":  "编辑器壳、Canvas Schema 与底图",
                      "dependencies":  {
                                           "source_text":  "WP-2；使用 WP-5 稳定 fixture",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [
                                                                 "WP-2",
                                                                 "WP-5"
                                                             ]
                                       },
                      "requirements":  [
                                           "EDITOR-01",
                                           "EDITOR-02",
                                           "EDITOR-03",
                                           "EXPORT-03",
                                           "GEN-12",
                                           "PROJECT-04"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-07",
                                                  "AC-20",
                                                  "AC-23"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "EDITOR-01 至 03、PROJECT-04、EXPORT-03、AC-07、20、23",
                                                     "GEN-12、EDITOR-01、PROJECT-04、AC-07"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.3 画布状态与渲染",
                                                        "13.1 P0-A 性能预算",
                                                        "13.2 视觉一致性"
                                                    ],
                      "modules":  [
                                      "web-editor",
                                      "canvas-schema",
                                      "api"
                                  ],
                      "implementation_boundary":  "按 UIDesign/低保真实现三栏编辑器、顶部/底部状态、Fabric 转换边界、底图填充/适配/裁剪/调色/滤镜/恢复原图和换底图",
                      "parent_families":  [
                                              "TDD-WP4-BG-001",
                                              "TDD-WP4-BG-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP4-BG-001-switch-background",
                                       "TDD-WP4-BG-002-processing-controls"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP4-BG-001",
                                            "assertion":  "换底图丢覆盖层、保留旧调色或色卡不刷新"
                                        },
                                        {
                                            "family_id":  "TDD-WP4-BG-002",
                                            "assertion":  "填充/适配/裁剪/缩放/定位或亮度、对比度、饱和度、色温、锐度、预设滤镜、恢复原图未保存、不可撤销或未进入导出"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP4-BG-001",
                                                "assertion":  "覆盖层位置/尺寸保留；底图参数重置；色卡重提；一次撤销和保存"
                                            },
                                            {
                                                "family_id":  "TDD-WP4-BG-002",
                                                "assertion":  "每项参数可预览、提交、撤销、自动保存并在重开与导出中一致；恢复原图只重置底图处理，不改变覆盖元素"
                                            }
                                        ],
                      "task_green_gate":  "底图参数可预览、提交、撤销、保存、重开和导出一致；换图保留覆盖层、重置底图处理并刷新色卡",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-editor, canvas-schema, api.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "E2E",
                                     "VIS-PERF"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-BG-001-switch-background/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-BG-002-processing-controls/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-4",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "editor",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "bHQnJ",
                                                          "frame_name":  "04A 三栏编辑器",
                                                          "primary_task":  "TASK-WP4-01",
                                                          "mapped_state_scope":  "三栏、保存状态、画布、对象属性与固定底栏；画布/素材加载；保存/素材失败；第 51 元素；conflicted/full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "editor",
                                                                     "actor_entry":  "有成功底图的项目所有者",
                                                                     "normal":  "三栏、保存状态、画布、属性与素材",
                                                                     "empty_loading":  "画布/素材加载；无成功图不能正常进入",
                                                                     "failure_disabled":  "保存/素材失败；第 51 元素、不可用模板禁用",
                                                                     "conflict_capacity_special":  "dirty/saving/saved/failed；conflicted 只读；full 可存 JSON，unavailable 保存失败"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP4-02",
                      "work_package":  "WP-4",
                      "title":  "画布选择、变换与普通贴纸",
                      "dependencies":  {
                                           "source_text":  "TASK-WP4-01",
                                           "task_ids":  [
                                                            "TASK-WP4-01"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "EDITOR-04",
                                           "EDITOR-05",
                                           "EDITOR-06",
                                           "EDITOR-07",
                                           "EDITOR-08",
                                           "EDITOR-09",
                                           "PROJECT-04"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-13",
                                                  "AC-27"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.5"
                                            ],
                      "requirement_ac_sources":  [
                                                     "EDITOR-04 至 09、17.5、AC-27",
                                                     "EDITOR-04 至 09、PROJECT-04、AC-13、27"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-CANVAS-50"
                                      ],
                      "development_plan_sections":  [
                                                        "9.3 画布状态与渲染"
                                                    ],
                      "modules":  [
                                      "web-editor",
                                      "canvas-schema"
                                  ],
                      "implementation_boundary":  "实现循环选择、长按候选、多选/框选、移动/缩放/旋转/翻转/透明度/复制/层级/吸附、撤销重做和 50 元素双端限制",
                      "parent_families":  [
                                              "TDD-WP4-CAN-001",
                                              "TDD-WP4-STK-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP4-CAN-001-fifty-elements",
                                       "TDD-WP4-STK-001-transform-sticker"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP4-CAN-001",
                                            "assertion":  "选择循环、多选、层级、吸附或第 51 元素错误"
                                        },
                                        {
                                            "family_id":  "TDD-WP4-STK-001",
                                            "assertion":  "普通贴纸变换不进入保存/撤销/导出"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP4-CAN-001",
                                                "assertion":  "50 元素可编辑保存导出；第 51 个阻断；无图层面板/隐藏/锁定/编组"
                                            },
                                            {
                                                "family_id":  "TDD-WP4-STK-001",
                                                "assertion":  "移动、缩放、旋转、翻转、透明度、复制、层级和多选一致"
                                            }
                                        ],
                      "task_green_gate":  "50 元素可编辑保存导出，第 51 个被阻断；无图层面板、隐藏、锁定、编组；动态 UI 不改变工具尺寸",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-editor, canvas-schema.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "E2E",
                                     "VIS-PERF"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-CAN-001-fifty-elements/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-STK-001-transform-sticker/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-4",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "editor",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "bHQnJ",
                                                          "frame_name":  "04A 三栏编辑器",
                                                          "primary_task":  "TASK-WP4-01",
                                                          "mapped_state_scope":  "三栏、保存状态、画布、对象属性与固定底栏；画布/素材加载；保存/素材失败；第 51 元素；conflicted/full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "editor",
                                                                     "actor_entry":  "有成功底图的项目所有者",
                                                                     "normal":  "三栏、保存状态、画布、属性与素材",
                                                                     "empty_loading":  "画布/素材加载；无成功图不能正常进入",
                                                                     "failure_disabled":  "保存/素材失败；第 51 元素、不可用模板禁用",
                                                                     "conflict_capacity_special":  "dirty/saving/saved/failed；conflicted 只读；full 可存 JSON，unavailable 保存失败"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP4-03",
                      "work_package":  "WP-4",
                      "title":  "文字模板、字体与属性",
                      "dependencies":  {
                                           "source_text":  "TASK-WP4-01；WP-5 模板/字体 fixture",
                                           "task_ids":  [
                                                            "TASK-WP4-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-5"
                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-02",
                                           "PROJECT-04",
                                           "TEXT-01",
                                           "TEXT-02",
                                           "TEXT-03",
                                           "TEXT-04",
                                           "TEXT-05",
                                           "TEXT-06",
                                           "TEXT-07",
                                           "TEXT-08",
                                           "TEXT-09",
                                           "TEXT-10",
                                           "TEXT-11",
                                           "TEXT-12",
                                           "TEXT-13",
                                           "TEXT-14"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-09",
                                                  "AC-10",
                                                  "AC-11",
                                                  "AC-12",
                                                  "AC-32"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.6"
                                            ],
                      "requirement_ac_sources":  [
                                                     "TEXT-01 至 06、PROJECT-04、AC-09、10",
                                                     "TEXT-01、17.6、AC-09、32",
                                                     "TEXT-07 至 14、NFR-02、AC-11、12"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.3 画布状态与渲染",
                                                        "9.4 素材面板与公开缓存"
                                                    ],
                      "modules":  [
                                      "web-editor",
                                      "asset-renderer",
                                      "font-loader"
                                  ],
                      "implementation_boundary":  "实现必须先选模板、四类/显示名搜索/catalog 顺序/账号最近使用、多行内容、模板切换、FontFace ready、字号/缩放、填充/描边/背景/对齐/行距/字距和一次提交撤销",
                      "parent_families":  [
                                              "TDD-WP4-TXT-001",
                                              "TDD-WP4-TXT-002",
                                              "TDD-WP4-TXT-003"
                                          ],
                      "case_ids":  [
                                       "TDD-WP4-TXT-001-multiline-template-switch",
                                       "TDD-WP4-TXT-002-font-metrics-ranges",
                                       "TDD-WP4-TXT-003-catalog-search-recent"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP4-TXT-001",
                                            "assertion":  "多行丢换行、空内容提交或切模板改变变换"
                                        },
                                        {
                                            "family_id":  "TDD-WP4-TXT-002",
                                            "assertion":  "字体静默回退、字号与控制柄不同步、文字裁切、范围步长错误或背景透明度影响文字"
                                        },
                                        {
                                            "family_id":  "TDD-WP4-TXT-003",
                                            "assertion":  "未选模板即可添加普通文字，或模板分类、显示名称搜索、catalog 顺序、账号最近使用漂移"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP4-TXT-001",
                                                "assertion":  "内容/换行持久；模板切换重置默认样式但保留位置/旋转/整体尺寸，可撤销"
                                            },
                                            {
                                                "family_id":  "TDD-WP4-TXT-002",
                                                "assertion":  "真实归档字体；字号与缩放同步且内容重新测量不裁切；行距/字距/描边等精确范围；完成为一次撤销；重新打开和导出一致"
                                            },
                                            {
                                                "family_id":  "TDD-WP4-TXT-003",
                                                "assertion":  "只能从模板添加；四类、显示名称搜索、稳定顺序和账号级最近使用符合 PRD；普通贴纸不复用该搜索"
                                            }
                                        ],
                      "task_green_gate":  "文本/换行/变换按规则保留；真实字体缺失使模板 unavailable；不提供普通文字或普通贴纸关键词搜索；不静默回退",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-editor, asset-renderer, font-loader.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "E2E",
                                     "VIS-PERF"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-TXT-001-multiline-template-switch/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-TXT-002-font-metrics-ranges/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-TXT-003-catalog-search-recent/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-4",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "editor",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "bHQnJ",
                                                          "frame_name":  "04A 三栏编辑器",
                                                          "primary_task":  "TASK-WP4-01",
                                                          "mapped_state_scope":  "三栏、保存状态、画布、对象属性与固定底栏；画布/素材加载；保存/素材失败；第 51 元素；conflicted/full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "editor",
                                                                     "actor_entry":  "有成功底图的项目所有者",
                                                                     "normal":  "三栏、保存状态、画布、属性与素材",
                                                                     "empty_loading":  "画布/素材加载；无成功图不能正常进入",
                                                                     "failure_disabled":  "保存/素材失败；第 51 元素、不可用模板禁用",
                                                                     "conflict_capacity_special":  "dirty/saving/saved/failed；conflicted 只读；full 可存 JSON，unavailable 保存失败"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP4-04",
                      "work_package":  "WP-4",
                      "title":  "色卡与动态贴纸 provider",
                      "dependencies":  {
                                           "source_text":  "TASK-WP4-01；WP-5 声明式资源",
                                           "task_ids":  [
                                                            "TASK-WP4-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-5"
                                                             ]
                                       },
                      "requirements":  [
                                           "COL-01",
                                           "COL-02",
                                           "COL-03",
                                           "COL-04",
                                           "COL-05",
                                           "DYN-01",
                                           "DYN-02",
                                           "DYN-03",
                                           "DYN-04",
                                           "DYN-05",
                                           "DYN-06",
                                           "DYN-07",
                                           "DYN-08",
                                           "DYN-09",
                                           "PRIV-03"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-14",
                                                  "AC-15",
                                                  "AC-16",
                                                  "AC-17",
                                                  "AC-18",
                                                  "AC-19",
                                                  "AC-47"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "COL-01 至 05、AC-15 P0-A 子集、16",
                                                     "DYN-01 至 03、AC-14",
                                                     "DYN-04、PRIV-03、AC-17、47",
                                                     "DYN-05 至 09、AC-18、19"
                                                 ],
                      "acceptance_scope_notes":  [
                                                     "COL-01 至 05、AC-15 P0-A 子集、16"
                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.3 画布状态与渲染",
                                                        "11.2 高德"
                                                    ],
                      "modules":  [
                                      "web-editor",
                                      "palette-provider",
                                      "dynamic-provider",
                                      "amap-adapter"
                                  ],
                      "implementation_boundary":  "实现 mmcq-v1 确定五色、四个色卡 renderer、时间/地点/身份 provider、DYN004 先确认后定位、坐标保存/清理、DYN012 FONT081 标记",
                      "parent_families":  [
                                              "TDD-WP4-COL-001",
                                              "TDD-WP4-DYN-001",
                                              "TDD-WP4-DYN-002",
                                              "TDD-WP4-DYN-003"
                                          ],
                      "case_ids":  [
                                       "TDD-WP4-COL-001-deterministic-palette",
                                       "TDD-WP4-DYN-001-fixed-time",
                                       "TDD-WP4-DYN-002-location-consent",
                                       "TDD-WP4-DYN-003-identity-font"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP4-COL-001",
                                            "assertion":  "色卡随机、读取处理后底图或额外上传图片"
                                        },
                                        {
                                            "family_id":  "TDD-WP4-DYN-001",
                                            "assertion":  "时间贴纸重开后变成新时间"
                                        },
                                        {
                                            "family_id":  "TDD-WP4-DYN-002",
                                            "assertion":  "DYN004 提示前调用定位、拒绝后插入或删除后留坐标"
                                        },
                                        {
                                            "family_id":  "TDD-WP4-DYN-003",
                                            "assertion":  "身份贴纸重复 @@、覆盖修改账号或 DYN012 静默换字体"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP4-COL-001",
                                                "assertion":  "同图 mmcq-v1 五色确定；裁剪/调色/滤镜不刷新；换底图刷新；网络上传为 0"
                                            },
                                            {
                                                "family_id":  "TDD-WP4-DYN-001",
                                                "assertion":  "使用插入/确认值并持久化，导出静态不可点击内容"
                                            },
                                            {
                                                "family_id":  "TDD-WP4-DYN-002",
                                                "assertion":  "同意后才定位并保存坐标；拒绝调用为 0；手动地点回退；删除/注销清理"
                                            },
                                            {
                                                "family_id":  "TDD-WP4-DYN-003",
                                                "assertion":  "前缀一个；实例覆盖独立；DYN012 固定 FONT081 且证据标记替代"
                                            }
                                        ],
                      "task_green_gate":  "色卡只读原始底图且网络上传为 0；时间值重开不漂移；拒绝定位调用为 0；身份前缀一个 @；DYN012 不静默换字体",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-editor, palette-provider, dynamic-provider, amap-adapter.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "E2E",
                                     "VIS-PERF",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-COL-001-deterministic-palette/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-DYN-001-fixed-time/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-DYN-002-location-consent/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-DYN-003-identity-font/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-4",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "editor",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "bHQnJ",
                                                          "frame_name":  "04A 三栏编辑器",
                                                          "primary_task":  "TASK-WP4-01",
                                                          "mapped_state_scope":  "三栏、保存状态、画布、对象属性与固定底栏；画布/素材加载；保存/素材失败；第 51 元素；conflicted/full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "editor",
                                                                     "actor_entry":  "有成功底图的项目所有者",
                                                                     "normal":  "三栏、保存状态、画布、属性与素材",
                                                                     "empty_loading":  "画布/素材加载；无成功图不能正常进入",
                                                                     "failure_disabled":  "保存/素材失败；第 51 元素、不可用模板禁用",
                                                                     "conflict_capacity_special":  "dirty/saving/saved/failed；conflicted 只读；full 可存 JSON，unavailable 保存失败"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP4-05",
                      "work_package":  "WP-4",
                      "title":  "客户端导出与结果弹层",
                      "dependencies":  {
                                           "source_text":  "TASK-WP4-01 至 TASK-WP4-04、TASK-WP2-07",
                                           "task_ids":  [
                                                            "TASK-WP2-07",
                                                            "TASK-WP4-01",
                                                            "TASK-WP4-04"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "EXPORT-01",
                                           "EXPORT-02",
                                           "EXPORT-03",
                                           "PROJECT-04",
                                           "PROJECT-06"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-23"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "EXPORT-01 至 03、AC-23",
                                                     "EXPORT-03、AC-23",
                                                     "PROJECT-04、06、EXPORT-03、AC-23"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-CANVAS-RATIOS"
                                      ],
                      "development_plan_sections":  [
                                                        "9.5 客户端导出与 latest exports"
                                                    ],
                      "modules":  [
                                      "web-editor",
                                      "export-compositor",
                                      "api",
                                      "local-data-root"
                                  ],
                      "implementation_boundary":  "实现四比例真实像素、sRGB、JPG 80-100/默认 92、PNG 无损、无水印、未提交修改确认、同一 Blob 下载/上传和四结果组合 UI",
                      "parent_families":  [
                                              "TDD-WP4-EXP-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP4-EXP-001-cancel-pending-edit",
                                       "TDD-WP4-EXP-001-confirm-pending-edit",
                                       "TDD-WP4-EXP-001-format-ratio"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP4-EXP-001",
                                            "assertion":  "四比例像素、JPG/PNG、未提交修改或同 Blob 规则错误"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP4-EXP-001",
                                                "assertion":  "精确像素、sRGB、无水印、PNG 无损、JPG 80-100 默认 92；未提交文字或样式经确认后，提交形成且仅形成一次撤销记录并进入正常自动保存，再用提交后的同一画布状态合成；真正的导出动作不额外创建撤销记录"
                                            }
                                        ],
                      "task_green_gate":  "确认未提交修改只形成一次撤销并进入自动保存；导出本身不额外建撤销；后端失败不撤回已成功下载",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-editor, export-compositor, api, local-data-root.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "E2E",
                                     "VIS-PERF"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-EXP-001-cancel-pending-edit/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-EXP-001-confirm-pending-edit/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-EXP-001-format-ratio/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-4",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "editor",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "bHQnJ",
                                                          "frame_name":  "04A 三栏编辑器",
                                                          "primary_task":  "TASK-WP4-01",
                                                          "mapped_state_scope":  "三栏、保存状态、画布、对象属性与固定底栏；画布/素材加载；保存/素材失败；第 51 元素；conflicted/full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "editor",
                                                                     "actor_entry":  "有成功底图的项目所有者",
                                                                     "normal":  "三栏、保存状态、画布、属性与素材",
                                                                     "empty_loading":  "画布/素材加载；无成功图不能正常进入",
                                                                     "failure_disabled":  "保存/素材失败；第 51 元素、不可用模板禁用",
                                                                     "conflict_capacity_special":  "dirty/saving/saved/failed；conflicted 只读；full 可存 JSON，unavailable 保存失败"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "export",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "i9upg7",
                                                          "frame_name":  "04B 导出弹层",
                                                          "primary_task":  "TASK-WP4-05",
                                                          "mapped_state_scope":  "JPG/PNG、质量、尺寸；合成/持久化加载；未提交确认；四类失败结果；冲突一次下载和 full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "export",
                                                                     "actor_entry":  "编辑器内项目所有者",
                                                                     "normal":  "JPG/PNG、质量、尺寸、下载/latest 分结果",
                                                                     "empty_loading":  "合成/持久化加载；无业务空态",
                                                                     "failure_disabled":  "合成、下载、项目保存、latest 保存分别失败；无画布/冲突次数用尽禁用",
                                                                     "conflict_capacity_special":  "未提交确认；conflicted 仅一次本地导出；full/unavailable 后端失败不撤回下载"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/export/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP4-06",
                      "work_package":  "WP-4",
                      "title":  "键盘、焦点与语义可访问性",
                      "dependencies":  {
                                           "source_text":  "TASK-WP4-01 至 TASK-WP4-05",
                                           "task_ids":  [
                                                            "TASK-WP4-01",
                                                            "TASK-WP4-05"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-06"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-32"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-06、AC-32"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "13.3 可访问性基础"
                                                    ],
                      "modules":  [
                                      "web",
                                      "web-editor"
                                  ],
                      "implementation_boundary":  "落实 skip link、焦点顺序、ARIA/live region、弹层焦点/返回、画布外等价控件、200% 缩放和 axe",
                      "parent_families":  [
                                              "TDD-WP4-A11Y-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP4-A11Y-001-keyboard-focus"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP4-A11Y-001",
                                            "assertion":  "关键动作不可键盘到达、焦点逃逸或状态只靠颜色"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP4-A11Y-001",
                                                "assertion":  "焦点顺序、ARIA、live region、弹层返回、等价画布工具、axe critical/serious 为 0"
                                            }
                                        ],
                      "task_green_gate":  "axe critical/serious 为 0；状态不只靠颜色；异步更新不抢焦点；最长文案、弹层和主动作可达",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web, web-editor.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "E2E",
                                     "VIS-PERF"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:e2e",
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-A11Y-001-keyboard-focus/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-4",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "editor",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "bHQnJ",
                                                          "frame_name":  "04A 三栏编辑器",
                                                          "primary_task":  "TASK-WP4-01",
                                                          "mapped_state_scope":  "三栏、保存状态、画布、对象属性与固定底栏；画布/素材加载；保存/素材失败；第 51 元素；conflicted/full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "editor",
                                                                     "actor_entry":  "有成功底图的项目所有者",
                                                                     "normal":  "三栏、保存状态、画布、属性与素材",
                                                                     "empty_loading":  "画布/素材加载；无成功图不能正常进入",
                                                                     "failure_disabled":  "保存/素材失败；第 51 元素、不可用模板禁用",
                                                                     "conflict_capacity_special":  "dirty/saving/saved/failed；conflicted 只读；full 可存 JSON，unavailable 保存失败"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP4-07",
                      "work_package":  "WP-4",
                      "title":  "视觉与性能预算",
                      "dependencies":  {
                                           "source_text":  "TASK-WP4-01 至 TASK-WP4-06；最终素材依赖 WP-5",
                                           "task_ids":  [
                                                            "TASK-WP4-01",
                                                            "TASK-WP4-06"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-5"
                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-02",
                                           "NFR-03"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-19",
                                                  "AC-23",
                                                  "AC-27",
                                                  "AC-32"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-02、AC-19、23、32",
                                                     "NFR-03、AC-27、32"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-CANVAS-50"
                                      ],
                      "development_plan_sections":  [
                                                        "13.1 P0-A 性能预算",
                                                        "13.2 视觉一致性"
                                                    ],
                      "modules":  [
                                      "web-editor",
                                      "test-visual-performance"
                                  ],
                      "implementation_boundary":  "建立固定 Canvas/字体/动态值、Chrome/Edge 截图 diff、50 元素交互、自动保存、编辑器打开、导出、内存和 DOM 性能 harness",
                      "parent_families":  [
                                              "TDD-WP4-PERF-001",
                                              "TDD-WP4-VIS-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP4-PERF-001-budget",
                                       "TDD-WP4-VIS-001-browser-diff"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP4-PERF-001",
                                            "assertion":  "50 元素、自动保存、资源面板或导出超过预算"
                                        },
                                        {
                                            "family_id":  "TDD-WP4-VIS-001",
                                            "assertion":  "Chrome/Edge 白名单结构或导出漂移"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP4-PERF-001",
                                                "assertion":  "第 10.2 节全部预算通过，失败不破坏项目或 latest export"
                                            },
                                            {
                                                "family_id":  "TDD-WP4-VIS-001",
                                                "assertion":  "固定环境按第 10 节阈值比较；已知替代项人工复核"
                                            }
                                        ],
                      "task_green_gate":  "边界偏差、显著像素和全部性能预算符合 tdd；已知替代人工复核；不得通过放宽超时、减元素或降尺寸掩盖失败",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-editor, test-visual-performance.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "VIS-PERF",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-PERF-001-budget/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP4-VIS-001-browser-diff/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-4",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "editor",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "bHQnJ",
                                                          "frame_name":  "04A 三栏编辑器",
                                                          "primary_task":  "TASK-WP4-01",
                                                          "mapped_state_scope":  "三栏、保存状态、画布、对象属性与固定底栏；画布/素材加载；保存/素材失败；第 51 元素；conflicted/full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "editor",
                                                                     "actor_entry":  "有成功底图的项目所有者",
                                                                     "normal":  "三栏、保存状态、画布、属性与素材",
                                                                     "empty_loading":  "画布/素材加载；无成功图不能正常进入",
                                                                     "failure_disabled":  "保存/素材失败；第 51 元素、不可用模板禁用",
                                                                     "conflict_capacity_special":  "dirty/saving/saved/failed；conflicted 只读；full 可存 JSON，unavailable 保存失败"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP5-01",
                      "work_package":  "WP-5",
                      "title":  "只读素材编译器",
                      "dependencies":  {
                                           "source_text":  "WP-0",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "COL-01",
                                           "COL-02",
                                           "COL-03",
                                           "COL-04",
                                           "COL-05",
                                           "DYN-01",
                                           "DYN-02",
                                           "DYN-03",
                                           "DYN-04",
                                           "DYN-05",
                                           "DYN-06",
                                           "DYN-07",
                                           "DYN-08",
                                           "DYN-09",
                                           "STATIC-01",
                                           "STATIC-02",
                                           "STATIC-03",
                                           "STATIC-04",
                                           "TEXT-01",
                                           "TEXT-02",
                                           "TEXT-03",
                                           "TEXT-04",
                                           "TEXT-05",
                                           "TEXT-06",
                                           "TEXT-07",
                                           "TEXT-08",
                                           "TEXT-09",
                                           "TEXT-10",
                                           "TEXT-11",
                                           "TEXT-12",
                                           "TEXT-13",
                                           "TEXT-14"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-32",
                                                  "AC-42"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "TEXT-01 至 TEXT-14、COL-01 至 COL-05、DYN-01 至 DYN-09、STATIC-01 至 STATIC-04、AC-32、42"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "10.1 唯一输入",
                                                        "10.3 复杂资源包"
                                                    ],
                      "modules":  [
                                      "asset-compiler",
                                      "asset-metadata",
                                      "local-data-root"
                                  ],
                      "implementation_boundary":  "建立 TypeScript CLI，只读读取规范 manifest/catalog/metadata，输出 TemplateRenderModel、版本化元数据、最小 derived 产物和源前后校验报告；不执行 Lua/Prefab",
                      "parent_families":  [
                                              "TDD-WP5-MAN-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP5-MAN-001-readonly-compiler"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP5-MAN-001",
                                            "assertion":  "编译器读取证据目录、执行 Lua/Prefab、复制全库或改写源"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP5-MAN-001",
                                                "assertion":  "只读规范入口；声明式转换；源前后哈希/时间不变；无等价全库副本"
                                            }
                                        ],
                      "task_green_gate":  "源文件哈希/时间不变；不读证据目录；不复制全库或形成等价派生副本；内容哈希去重复用",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: asset-compiler, asset-metadata, local-data-root.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "PKG-SEC",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-MAN-001-readonly-compiler/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-5",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP5-02",
                      "work_package":  "WP-5",
                      "title":  "普通贴纸 catalog 与虚拟目录",
                      "dependencies":  {
                                           "source_text":  "TASK-WP5-01",
                                           "task_ids":  [
                                                            "TASK-WP5-01"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "STATIC-01",
                                           "STATIC-02",
                                           "STATIC-03",
                                           "STATIC-04"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-13",
                                                  "AC-32"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "STATIC-01 至 04、AC-13、32"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.4 素材面板与公开缓存",
                                                        "10.2 StaticStickerCatalog 构建"
                                                    ],
                      "modules":  [
                                      "asset-compiler",
                                      "static-sticker-catalog",
                                      "web"
                                  ],
                      "implementation_boundary":  "构建 part1-25 的 1,407 项 StaticStickerCatalog，保留三组重复、稳定 ID/顺序/哈希/尺寸/MIME/缩略图引用；接入虚拟列表和懒加载",
                      "parent_families":  [
                                              "TDD-WP5-CAT-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP5-CAT-001-catalog-1407"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP5-CAT-001",
                                            "assertion":  "计数、part、重复项、顺序或懒加载错误"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP5-CAT-001",
                                                "assertion":  "part1-25 共 1,407 PNG；3 组重复保留；虚拟列表节点不线性增长，原图按需加载"
                                            }
                                        ],
                      "task_green_gate":  "计数、part、重复和顺序精确；原图按需加载；DOM 只保留视口和两屏缓冲",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: asset-compiler, static-sticker-catalog, web.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "E2E",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-CAT-001-catalog-1407/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-5",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP5-03",
                      "work_package":  "WP-5",
                      "title":  "复杂资源注册与 P0-A 白名单",
                      "dependencies":  {
                                           "source_text":  "TASK-WP5-01；与 WP-4 renderer 契约联调",
                                           "task_ids":  [
                                                            "TASK-WP5-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-4"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-07",
                                           "COL-01",
                                           "COL-02",
                                           "COL-03",
                                           "COL-04",
                                           "COL-05",
                                           "DYN-01",
                                           "DYN-08",
                                           "NFR-02",
                                           "NFR-07",
                                           "STATIC-01",
                                           "TEXT-01",
                                           "TEXT-04"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-15",
                                                  "AC-16",
                                                  "AC-32",
                                                  "AC-42",
                                                  "AC-48"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "COL-01 至 05、AC-15 P0-A 子集、16、32",
                                                     "TEXT-01、TEXT-04、COL-01、DYN-01、DYN-08、STATIC-01、ADMIN-07、NFR-02、NFR-07、AC-32、42、48"
                                                 ],
                      "acceptance_scope_notes":  [
                                                     "COL-01 至 05、AC-15 P0-A 子集、16、32"
                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "10.3 复杂资源包",
                                                        "10.5 Manifest 与发布路径"
                                                    ],
                      "modules":  [
                                      "asset-compiler",
                                      "template-registry",
                                      "asset-renderer"
                                  ],
                      "implementation_boundary":  "导入注册 332 文字、86 字体项、16 色卡、35 动态；公开 manifest 只启用 32 文字、实际字体+FONT081、COLOR001/002/008/016、10 动态和 1,407 普通贴纸",
                      "parent_families":  [
                                              "TDD-WP5-COL-001",
                                              "TDD-WP5-WHITE-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP5-COL-001-four-layouts",
                                       "TDD-WP5-WHITE-001-p0a-allowlist"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP5-COL-001",
                                            "assertion":  "P0-A 启用非四种色卡或四种布局不消费同一五色"
                                        },
                                        {
                                            "family_id":  "TDD-WP5-WHITE-001",
                                            "assertion":  "普通用户发现白名单外复杂素材或缺少规定白名单"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP5-COL-001",
                                                "assertion":  "只启用 COLOR001/002/008/016，统一五色，刷新规则与 WP-4 一致"
                                            },
                                            {
                                                "family_id":  "TDD-WP5-WHITE-001",
                                                "assertion":  "精确 32 文字、实际字体+FONT081、4 色卡、10 动态、1,407 普通贴纸"
                                            }
                                        ],
                      "task_green_gate":  "白名单外复杂素材不对普通用户可见；四种色卡消费同一五色；色卡/动态不计入 25 part；不把 full_p0 分批公开",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: asset-compiler, template-registry, asset-renderer.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "E2E",
                                     "VIS-PERF",
                                     "API"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm test:e2e",
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm test:api",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-COL-001-four-layouts/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-WHITE-001-p0a-allowlist/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-5",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP5-04",
                      "work_package":  "WP-5",
                      "title":  "Immutable manifest 与三类资源隔离",
                      "dependencies":  {
                                           "source_text":  "TASK-WP5-01 至 TASK-WP5-03、WP-0 gate/cache",
                                           "task_ids":  [
                                                            "TASK-WP5-01",
                                                            "TASK-WP5-03"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-07",
                                           "PRIV-02",
                                           "PRIV-05"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-42",
                                                  "AC-46",
                                                  "AC-48"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.12",
                                                "17.13",
                                                "17.14"
                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-07、17.14、AC-46、48",
                                                     "PRIV-02、05、17.12、13、AC-42、48"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.4 素材面板与公开缓存",
                                                        "10.5 Manifest 与发布路径",
                                                        "10.6 三类资源隔离"
                                                    ],
                      "modules":  [
                                      "api",
                                      "asset-release-manifest",
                                      "web-client-cache"
                                  ],
                      "implementation_boundary":  "实现 release_version、manifest/file SHA-256、public/preview/private 三类路由、鉴权、no-store/immutable 缓存和不可推导资源 URL",
                      "parent_families":  [
                                              "TDD-WP5-CACHE-001",
                                              "TDD-WP5-RES-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP5-CACHE-001-no-private-client-state",
                                       "TDD-WP5-RES-001-three-access-classes"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP5-CACHE-001",
                                            "assertion":  "SW 拦截 internal/private 或 IndexedDB 保存私有字段"
                                        },
                                        {
                                            "family_id":  "TDD-WP5-RES-001",
                                            "assertion":  "公开 manifest 暴露 internal/private、路径可推导或缓存策略混用"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP5-CACHE-001",
                                                "assertion":  "仅公开 allowlist；每场景实际枚举 registration、Cache keys 和 IndexedDB 记录"
                                            },
                                            {
                                                "family_id":  "TDD-WP5-RES-001",
                                                "assertion":  "三类路由、鉴权和 cache header 分离；浏览器永不获得绝对路径"
                                            }
                                        ],
                      "task_green_gate":  "public manifest 不含 internal/private；浏览器不见绝对路径；SW/Cache/IndexedDB 实际枚举无私有或预览内容",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, asset-release-manifest, web-client-cache.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "E2E",
                                     "API",
                                     "PKG-SEC"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:e2e",
                                                  "pnpm test:api",
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-CACHE-001-no-private-client-state/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-RES-001-three-access-classes/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-5",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "preview-user-variant",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP5-07",
                                                          "mapped_state_scope":  "有效授权、无授权/空批次、加载、撤销/过期阻断；不出现后台权限；全局容量条"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "preview-user-variant",
                                                                     "actor_entry":  "有有效/撤销/过期 AssetPreviewGrant 的普通账号",
                                                                     "normal":  "授权批次素材显示“预览”，其余页面同普通用户",
                                                                     "empty_loading":  "无授权/批次空；manifest 加载",
                                                                     "failure_disabled":  "撤销/过期立即阻断新读取",
                                                                     "conflict_capacity_special":  "不出现后台入口、调点、邀请码、模型或私有内容；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/preview-user-variant/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP5-05",
                      "work_package":  "WP-5",
                      "title":  "后台普通贴纸上传与版本发布",
                      "dependencies":  {
                                           "source_text":  "TASK-WP5-02、TASK-WP5-04、WP-0 存储",
                                           "task_ids":  [
                                                            "TASK-WP5-02",
                                                            "TASK-WP5-04"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-0"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-06"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-31",
                                                  "AC-55"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.7",
                                                "17.19"
                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-06、17.7、17.19、AC-31、55"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "10.4 后台新增普通贴纸"
                                                    ],
                      "modules":  [
                                      "api",
                                      "worker",
                                      "sqlite",
                                      "local-data-root",
                                      "web-admin"
                                  ],
                      "implementation_boundary":  "实现 PNG/WebP 流式校验、stable ID/part/顺序、原图与缩略图独立预留/计量、immutable release 切换和旧版本保留",
                      "parent_families":  [
                                              "TDD-WP5-UPL-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP5-UPL-001-upload-metering"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP5-UPL-001",
                                            "assertion":  "后台上传未流式校验、原图/缩略图漏计量或 full 仍写入"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP5-UPL-001",
                                                "assertion":  "PNG/WebP、稳定 ID、part、顺序和 MIME 校验；两类文件分别预留并计量"
                                            }
                                        ],
                      "task_green_gate":  "两类文件均计入 5 GB；full/unavailable 阻断；恰好等于上限允许提交后 full；不把既有归档复制进 managed-assets",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root, web-admin.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-UPL-001-upload-metering/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-5",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-assets",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "A28V3c",
                                                          "frame_name":  "06C 素材与历史清理",
                                                          "primary_task":  "TASK-WP5-06",
                                                          "mapped_state_scope":  "上传/版本/候选；无上传/无候选；格式/编译/权限失败；full/unavailable；引用冲突、排队、物理删除和重计量"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-assets",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "普通贴纸、资源版本/发布、历史清理",
                                                                     "empty_loading":  "无上传素材/无候选；列表/处理加载",
                                                                     "failure_disabled":  "格式/编译失败；权限、文件状态禁用",
                                                                     "conflict_capacity_special":  "stable ID/version 冲突；full/unavailable 阻断上传；引用冲突/排队/重计量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-assets/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP5-06",
                      "work_package":  "WP-5",
                      "title":  "历史贴纸显式清理",
                      "dependencies":  {
                                           "source_text":  "TASK-WP5-05、WP-2 project_asset_refs、WP-1 审计",
                                           "task_ids":  [
                                                            "TASK-WP5-05"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-1",
                                                                 "WP-2"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-06",
                                           "ADMIN-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-31",
                                                  "AC-50",
                                                  "AC-55"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.7",
                                                "17.19"
                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-06、09、17.7、17.19、AC-31、50、55"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "7.7 后台贴纸历史文件显式清理"
                                                    ],
                      "modules":  [
                                      "api",
                                      "worker",
                                      "sqlite",
                                      "local-data-root",
                                      "web-admin"
                                  ],
                      "implementation_boundary":  "实现候选查询、同管理员确认、短期 snapshot、BEGIN IMMEDIATE 全引用复核、整批拒绝/排队、Worker 物理删除、重计量和全阶段审计",
                      "parent_families":  [
                                              "TDD-WP5-CLN-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP5-CLN-001-reference-race"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP5-CLN-001",
                                            "assertion":  "自动清理、有引用仍删除、整批部分排队或排队即减容量"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP5-CLN-001",
                                                "assertion":  "候选、同管理员确认、BEGIN IMMEDIATE 复核、整批拒绝/排队、物理删除、重测和全阶段审计"
                                            }
                                        ],
                      "task_green_gate":  "有任一 release/active/trashed/待发布引用则整批拒绝；排队不减容量；无自动清理；物理删除和重测后才恢复",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, worker, sqlite, local-data-root, web-admin.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "WRK",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:worker",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-CLN-001-reference-race/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-5",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-assets",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "A28V3c",
                                                          "frame_name":  "06C 素材与历史清理",
                                                          "primary_task":  "TASK-WP5-06",
                                                          "mapped_state_scope":  "上传/版本/候选；无上传/无候选；格式/编译/权限失败；full/unavailable；引用冲突、排队、物理删除和重计量"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-assets",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "普通贴纸、资源版本/发布、历史清理",
                                                                     "empty_loading":  "无上传素材/无候选；列表/处理加载",
                                                                     "failure_disabled":  "格式/编译失败；权限、文件状态禁用",
                                                                     "conflict_capacity_special":  "stable ID/version 冲突；full/unavailable 阻断上传；引用冲突/排队/重计量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-assets/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP5-07",
                      "work_package":  "WP-5",
                      "title":  "内部预览授权生命周期",
                      "dependencies":  {
                                           "source_text":  "TASK-WP5-03、TASK-WP5-04、WP-1 会话",
                                           "task_ids":  [
                                                            "TASK-WP5-03",
                                                            "TASK-WP5-04"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-1"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-07"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-42",
                                                  "AC-48"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.13"
                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-07、17.13、AC-42、48"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.7 内部预览授权"
                                                    ],
                      "modules":  [
                                      "api",
                                      "sqlite",
                                      "web",
                                      "web-admin"
                                  ],
                      "implementation_boundary":  "实现批次、AssetPreviewGrant、active/revoked/expired、每次授权校验、随机 manifest item ID、撤销即时阻断和既有项目按版本渲染",
                      "parent_families":  [
                                              "TDD-WP5-PREV-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP5-PREV-001-grant-lifecycle"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP5-PREV-001",
                                            "assertion":  "授权改变角色、公开 manifest 泄漏或撤销后仍可取资源"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP5-PREV-001",
                                                "assertion":  "每次校验 grant；no-store；撤销立即阻断新访问；已有项目按版本渲染"
                                            }
                                        ],
                      "task_green_gate":  "授权不改变普通用户角色；不出现后台能力；撤销/到期阻断新取用但不破坏已保存项目",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: api, sqlite, web, web-admin.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP5-PREV-001-grant-lifecycle/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-5",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "preview-user-variant",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP5-07",
                                                          "mapped_state_scope":  "有效授权、无授权/空批次、加载、撤销/过期阻断；不出现后台权限；全局容量条"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "preview-user-variant",
                                                                     "actor_entry":  "有有效/撤销/过期 AssetPreviewGrant 的普通账号",
                                                                     "normal":  "授权批次素材显示“预览”，其余页面同普通用户",
                                                                     "empty_loading":  "无授权/批次空；manifest 加载",
                                                                     "failure_disabled":  "撤销/过期立即阻断新读取",
                                                                     "conflict_capacity_special":  "不出现后台入口、调点、邀请码、模型或私有内容；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/preview-user-variant/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-preview",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP5-07",
                                                          "mapped_state_scope":  "批次、模板状态、授权/撤销/到期、空/骨架、非法转换/发布失败；不出现 P0-B 全量开放"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-preview",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "批次、模板状态、账号授权/撤销/到期",
                                                                     "empty_loading":  "无批次/授权；表格骨架",
                                                                     "failure_disabled":  "非法状态转换、过期、发布校验失败",
                                                                     "conflict_capacity_special":  "授权不改变角色；P0-B 全量开放不可在 P0-A 出现；继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-preview/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP6-01",
                      "work_package":  "WP-6",
                      "title":  "后台壳、权限与安全摘要",
                      "dependencies":  {
                                           "source_text":  "WP-1、WP-2、WP-5",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [
                                                                 "WP-1",
                                                                 "WP-2",
                                                                 "WP-5"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-01",
                                           "ADMIN-02",
                                           "ADMIN-04",
                                           "ADMIN-08"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-25",
                                                  "AC-49"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-01、02、04、08、AC-25、49"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.6 运营后台与两类审计"
                                                    ],
                      "modules":  [
                                      "web-admin",
                                      "api",
                                      "sqlite"
                                  ],
                      "implementation_boundary":  "按 UIDesign 实现独立 /admin 路由域、侧栏/总览、用户、邀请码、点数、素材、预览、生成记录入口和 active super_admin 服务端授权",
                      "parent_families":  [
                                              "TDD-WP6-ADM-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP6-ADM-001-role-and-summary"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP6-ADM-001",
                                            "assertion":  "普通/预览账号进入后台、后台显示私有正文或敏感配置"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP6-ADM-001",
                                                "assertion":  "active super_admin 服务端授权；默认仅安全摘要；角色和会话域严格分离"
                                            }
                                        ],
                      "task_green_gate":  "普通/预览账号无法进入；管理员与普通 session 域分离；默认列表只含脱敏摘要；无敏感配置回显",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-admin, api, sqlite.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-ADM-001-role-and-summary/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-6",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-overview",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "e4e2Kz",
                                                          "frame_name":  "06A 后台总览",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "名额、任务、成本核对、服务/容量和审计摘要；骨架/空事件；聚合失败；三模型状态分列和待处理事项"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-overview",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "名额、任务、模型、点数、服务、容量、审计摘要",
                                                                     "empty_loading":  "无近期事件；指标骨架",
                                                                     "failure_disabled":  "聚合失败保留旧值和时间；敏感动作按状态禁用",
                                                                     "conflict_capacity_special":  "default/runtime/recommended 分列；pending_manual_review 为成本核对；容量持续条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-overview/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-users",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "脱敏列表/详情、暂停恢复/调点、空/筛选空/骨架、原因缺失和状态禁用、负 available"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-users",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "脱敏列表/详情、暂停恢复、调点",
                                                                     "empty_loading":  "无用户/筛选空；表格骨架",
                                                                     "failure_disabled":  "操作失败、原因缺失、状态前置禁用",
                                                                     "conflict_capacity_special":  "调点可使 available 为负但 reserved 不变；页面操作不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-users/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-invites",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "创建/停用/期限/次数/脱敏复制、空/骨架、名额满、过期/耗尽、请求失败和幂等/CAS 结果"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-invites",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "创建、停用、期限/次数、脱敏复制",
                                                                     "empty_loading":  "无邀请码；表格骨架",
                                                                     "failure_disabled":  "名额满、停用/过期/耗尽不可当可用；请求失败",
                                                                     "conflict_capacity_special":  "CAS/幂等结果；页面操作不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-invites/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-assets",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "A28V3c",
                                                          "frame_name":  "06C 素材与历史清理",
                                                          "primary_task":  "TASK-WP5-06",
                                                          "mapped_state_scope":  "上传/版本/候选；无上传/无候选；格式/编译/权限失败；full/unavailable；引用冲突、排队、物理删除和重计量"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-assets",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "普通贴纸、资源版本/发布、历史清理",
                                                                     "empty_loading":  "无上传素材/无候选；列表/处理加载",
                                                                     "failure_disabled":  "格式/编译失败；权限、文件状态禁用",
                                                                     "conflict_capacity_special":  "stable ID/version 冲突；full/unavailable 阻断上传；引用冲突/排队/重计量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-assets/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-preview",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP5-07",
                                                          "mapped_state_scope":  "批次、模板状态、授权/撤销/到期、空/骨架、非法转换/发布失败；不出现 P0-B 全量开放"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-preview",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "批次、模板状态、账号授权/撤销/到期",
                                                                     "empty_loading":  "无批次/授权；表格骨架",
                                                                     "failure_disabled":  "非法状态转换、过期、发布校验失败",
                                                                     "conflict_capacity_special":  "授权不改变角色；P0-B 全量开放不可在 P0-A 出现；继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-preview/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP6-02",
                      "work_package":  "WP-6",
                      "title":  "私有内容告知与逐次访问",
                      "dependencies":  {
                                           "source_text":  "TASK-WP6-01、WP-1 UserProfile/审计",
                                           "task_ids":  [
                                                            "TASK-WP6-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-1"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-05"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-25",
                                                  "AC-50"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.1",
                                                "17.10"
                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-05、17.1、AC-25",
                                                     "ADMIN-05、17.10、AC-25",
                                                     "ADMIN-05、17.10、AC-25、50",
                                                     "ADMIN-05、AC-25"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [
                                          "FX-ACTOR-ADMIN-A"
                                      ],
                      "development_plan_sections":  [
                                                        "7.8 私有内容告知确认与逐次访问",
                                                        "9.6 运营后台与两类审计"
                                                    ],
                      "modules":  [
                                      "web-admin",
                                      "api",
                                      "sqlite",
                                      "local-data-root"
                                  ],
                      "implementation_boundary":  "实现当前 notice version bootstrap、身份+版本持久 ack、428 区域门禁、升版重阻断、“打开并记录审计”和先审计后返回内容",
                      "parent_families":  [
                                              "TDD-WP6-PRIV-001",
                                              "TDD-WP6-PRIV-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP6-PRIV-001-ack",
                                       "TDD-WP6-PRIV-001-persistence",
                                       "TDD-WP6-PRIV-001-version-bump",
                                       "TDD-WP6-PRIV-002-deny-without-audit",
                                       "TDD-WP6-PRIV-002-open-after-audit"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP6-PRIV-001",
                                            "assertion":  "告知确认只存在 Cookie/session/localStorage 或同版本重复"
                                        },
                                        {
                                            "family_id":  "TDD-WP6-PRIV-002",
                                            "assertion":  "hover/预取打开内容、确认替代逐次审计、要求填写访问目的/原因或审计失败仍返回内容"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP6-PRIV-001",
                                                "assertion":  "UserProfile 按 admin+version 持久；跨标签、浏览器/API 重启、重登和 Chrome/Edge不重复；升版重阻断"
                                            },
                                            {
                                                "family_id":  "TDD-WP6-PRIV-002",
                                                "assertion":  "每个入口原样显示“打开并记录审计”；每次点击先提交独立 PrivateContentAccessLog；UI 和 API 均不要求逐次填写访问目的、原因或二次确认；审计只记录 PRD/DevelopmentPlan 允许的对象、管理员、时间、内容类型等非正文信息；失败不返回；列表/HTML/缓存无正文"
                                            }
                                        ],
                      "task_green_gate":  "跨标签、重启、重登和 Chrome/Edge 同版本不重复；hover/预取不打开；每次点击独立记录；审计失败不返回内容；不要求逐次填写原因",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-admin, api, sqlite, local-data-root.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-001-ack/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-001-persistence/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-001-version-bump/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-002-deny-without-audit/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-PRIV-002-open-after-audit/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-6",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-generations",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "OnsiT",
                                                          "frame_name":  "06D 生成记录与私有告知",
                                                          "primary_task":  "TASK-WP6-02",
                                                          "mapped_state_scope":  "默认隐藏正文；身份+版本告知；逐次打开；空记录/审计写入加载；428、审计失败、升版重阻断"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-generations",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "默认安全摘要、告知、逐次打开",
                                                                     "empty_loading":  "无记录；列表/审计写入加载",
                                                                     "failure_disabled":  "未确认 428、审计失败不打开、权限禁用",
                                                                     "conflict_capacity_special":  "告知升版重阻断；每次打开先独立审计；页面读取不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-generations/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP6-03",
                      "work_package":  "WP-6",
                      "title":  "免费服务硬停止与恢复",
                      "dependencies":  {
                                           "source_text":  "TASK-WP6-01、WP-1/2 事务基础",
                                           "task_ids":  [
                                                            "TASK-WP6-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-1"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-05",
                                           "ADMIN-08",
                                           "ADMIN-09",
                                           "NFR-08"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-47",
                                                  "AC-52"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.15"
                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-05、08、NFR-08、17.15、AC-47",
                                                     "ADMIN-08、09、NFR-08、AC-47、52"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "11.1 Resend",
                                                        "11.2 高德"
                                                    ],
                      "modules":  [
                                      "web-admin",
                                      "api",
                                      "sqlite",
                                      "resend-adapter",
                                      "amap-adapter"
                                  ],
                      "implementation_boundary":  "实现 Resend 每日/月度、高德月度用量领取，paused_quota/provider、上限只可下调、健康检查和 super_admin 人工恢复",
                      "parent_families":  [
                                              "TDD-WP6-SVC-001",
                                              "TDD-WP6-SVC-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP6-SVC-001-hard-quota",
                                       "TDD-WP6-SVC-002-limit-recovery"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP6-SVC-001",
                                            "assertion":  "Resend 发第 81 封/超月限、高德发第 1001 次或暂停后伪造成功"
                                        },
                                        {
                                            "family_id":  "TDD-WP6-SVC-002",
                                            "assertion":  "后台提高上限、启用收费或自动恢复"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP6-SVC-001",
                                                "assertion":  "配额领取事务化；paused_quota/provider；已有会话继续；DYN004 停而手动地点继续"
                                            },
                                            {
                                                "family_id":  "TDD-WP6-SVC-002",
                                                "assertion":  "只允许不扩大能力的下调并审计；提高/付费/自动扩容被拒绝；恢复需前置确认"
                                            }
                                        ],
                      "task_green_gate":  "第 81/1001 次不调用；不得提高固定上限、启用收费、自动恢复/扩容；高德暂停只影响 DYN004 自动定位",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-admin, api, sqlite, resend-adapter, amap-adapter.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "EXT-MOCK",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:all",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-SVC-001-hard-quota/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-SVC-002-limit-recovery/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-6",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-services-storage",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "L3lde2",
                                                          "frame_name":  "06E 服务与存储",
                                                          "primary_task":  "TASK-WP6-05",
                                                          "mapped_state_scope":  "Resend/高德/网关/Worker/LocalDataRoot；指标加载；paused/degraded/unavailable；恢复前置、清理排队和重计量"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-services-storage",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "Resend/高德/网关/Worker/LocalDataRoot 状态与允许动作",
                                                                     "empty_loading":  "指标加载；无告警",
                                                                     "failure_disabled":  "paused/degraded/unavailable；不合法恢复/提高上限禁用",
                                                                     "conflict_capacity_special":  "full/unavailable、清理排队和物理重计量；不显示绝对路径"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-services-storage/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP6-04",
                      "work_package":  "WP-6",
                      "title":  "敏感操作审计与保留",
                      "dependencies":  {
                                           "source_text":  "TASK-WP6-01 至 TASK-WP6-03、WP-5 清理",
                                           "task_ids":  [
                                                            "TASK-WP6-01",
                                                            "TASK-WP6-03"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-5"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-50"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [
                                                "17.16"
                                            ],
                      "requirement_ac_sources":  [
                                                     "ADMIN-09、17.16、AC-50"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "9.6 运营后台与两类审计",
                                                        "12.3 审计与敏感信息"
                                                    ],
                      "modules":  [
                                      "web-admin",
                                      "api",
                                      "worker",
                                      "sqlite"
                                  ],
                      "implementation_boundary":  "把用户、点数、邀请、模型、素材、预览、服务、余额恢复和贴纸清理各阶段纳入同事务 AdminOperationLog；实现 180 天 Worker 清理",
                      "parent_families":  [
                                              "TDD-WP6-AUD-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP6-AUD-001-sensitive-operations"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP6-AUD-001",
                                            "assertion":  "敏感操作无日志、两类日志混用、含正文或 180 天内可删"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP6-AUD-001",
                                                "assertion":  "全部规定操作同事务审计；贴纸清理全阶段；两类表分离；到期 Worker 清理"
                                            }
                                        ],
                      "task_green_gate":  "两类审计严格分离、180 天内不可改删、贴纸清理请求/复核/拒绝或排队/物理结果齐全且不含正文",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-admin, api, worker, sqlite.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "SQLite constraints, transactions, idempotency and side-effect assertions",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "DB",
                                     "API",
                                     "WRK",
                                     "E2E"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:integration",
                                                  "pnpm test:api",
                                                  "pnpm test:worker",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-AUD-001-sensitive-operations/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-6",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-audit",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "DlCpN",
                                                          "frame_name":  "06F 私有内容访问审计",
                                                          "primary_task":  "TASK-WP6-04",
                                                          "mapped_state_scope":  "两类独立审计、游标和 180 天；空/加载；查询失败；不可编辑删除；无正文、图片、密钥和路径"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-audit",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "后台操作与私有访问两类独立页/标签",
                                                                     "empty_loading":  "无记录；游标加载",
                                                                     "failure_disabled":  "查询失败保留旧结果；无修改/人工删除动作",
                                                                     "conflict_capacity_special":  "180 天保留；正文、图片、密钥和路径不出现；页面读取不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-audit/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP6-05",
                      "work_package":  "WP-6",
                      "title":  "模型/服务/存储状态与诊断",
                      "dependencies":  {
                                           "source_text":  "TASK-WP6-01、WP-0 诊断、WP-3 runtime",
                                           "task_ids":  [
                                                            "TASK-WP6-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-0",
                                                                 "WP-3"
                                                             ]
                                       },
                      "requirements":  [
                                           "ADMIN-03",
                                           "ADMIN-08",
                                           "GEN-15",
                                           "NFR-09",
                                           "PRIV-01",
                                           "PRIV-02"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-30",
                                                  "AC-41",
                                                  "AC-51",
                                                  "AC-55"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "GEN-15、ADMIN-03、08、AC-30、51",
                                                     "PRIV-01、02、ADMIN-08、NFR-09、AC-41、55"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "7.6 ModelConfig 原子配置与运行时推荐",
                                                        "9.6 运营后台与两类审计",
                                                        "11 外部服务硬停止与恢复"
                                                    ],
                      "modules":  [
                                      "web-admin",
                                      "api",
                                      "sqlite",
                                      "supervisor"
                                  ],
                      "implementation_boundary":  "实现总览、模型、服务与存储页面的 configured default/runtime/recommended 三列、Worker/网关/Resend/高德/storage 状态、REST refetch 和复制诊断",
                      "parent_families":  [
                                              "TDD-WP6-DIAG-001",
                                              "TDD-WP6-STATE-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP6-DIAG-001-redacted-diagnostics",
                                       "TDD-WP6-STATE-001-three-model-states"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP6-DIAG-001",
                                            "assertion":  "总览/服务/存储/诊断暴露路径、密钥或正文"
                                        },
                                        {
                                            "family_id":  "TDD-WP6-STATE-001",
                                            "assertion":  "后台把 configured default、runtime availability 和 recommended 合并"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP6-DIAG-001",
                                                "assertion":  "只显示固定非敏感字段、计量和状态；复制诊断通过同一脱敏扫描"
                                            },
                                            {
                                                "family_id":  "TDD-WP6-STATE-001",
                                                "assertion":  "三列独立；临时异常不改配置；恢复只重新派生推荐"
                                            }
                                        ],
                      "task_green_gate":  "推荐可 null；runtime 变化不回写配置；只显示稳定非敏感字段和逻辑位置；无密钥、邮箱、路径、正文或供应商原文",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: web-admin, api, sqlite, supervisor.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "OpenAPI, error envelope and HTTP semantics",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "API",
                                     "E2E",
                                     "PKG-SEC"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:api",
                                                  "pnpm test:e2e",
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-DIAG-001-redacted-diagnostics/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP6-STATE-001-three-model-states/"
                                               ],
                      "automation":  [
                                         "automated"
                                     ],
                      "release_gate":  [
                                           "work_package:WP-6",
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "admin-overview",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "e4e2Kz",
                                                          "frame_name":  "06A 后台总览",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "名额、任务、成本核对、服务/容量和审计摘要；骨架/空事件；聚合失败；三模型状态分列和待处理事项"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-overview",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "名额、任务、模型、点数、服务、容量、审计摘要",
                                                                     "empty_loading":  "无近期事件；指标骨架",
                                                                     "failure_disabled":  "聚合失败保留旧值和时间；敏感动作按状态禁用",
                                                                     "conflict_capacity_special":  "default/runtime/recommended 分列；pending_manual_review 为成本核对；容量持续条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-overview/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-models",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "YVfVG",
                                                          "frame_name":  "06B 模型配置",
                                                          "primary_task":  "TASK-WP6-05",
                                                          "mapped_state_scope":  "完整三模型集合、default/runtime/recommended；加载；空推荐；替代/priority 禁用；CAS 冲突和整套回滚"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-models",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "完整三模型集合、default/runtime/recommended 三层",
                                                                     "empty_loading":  "初始加载骨架；无 recommended 是合法状态",
                                                                     "failure_disabled":  "合法替代/priority 前置禁用；契约未验证/运行时不可用",
                                                                     "conflict_capacity_special":  "config_set CAS 冲突、完整集合原子回滚；仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-models/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-services-storage",
                                           "role":  "implementation",
                                           "frames":  {
                                                          "frame_id":  "L3lde2",
                                                          "frame_name":  "06E 服务与存储",
                                                          "primary_task":  "TASK-WP6-05",
                                                          "mapped_state_scope":  "Resend/高德/网关/Worker/LocalDataRoot；指标加载；paused/degraded/unavailable；恢复前置、清理排队和重计量"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-services-storage",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "Resend/高德/网关/Worker/LocalDataRoot 状态与允许动作",
                                                                     "empty_loading":  "指标加载；无告警",
                                                                     "failure_disabled":  "paused/degraded/unavailable；不合法恢复/提高上限禁用",
                                                                     "conflict_capacity_special":  "full/unavailable、清理排队和物理重计量；不显示绝对路径"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-services-storage/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP7-01",
                      "work_package":  "WP-7",
                      "title":  "候选制品与候选浏览器记录",
                      "dependencies":  {
                                           "source_text":  "WP-0 至 WP-6 Green",
                                           "task_ids":  [

                                                        ],
                                           "work_packages":  [
                                                                 "WP-0",
                                                                 "WP-6"
                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-01",
                                           "NFR-09"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-24",
                                                  "AC-41"
                                              ],
                      "acceptance_criteria_role":  "supporting",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-01、NFR-09、AC-24、AC-41；候选记录支撑，不新增测试 case"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "3.1 便携包布局",
                                                        "3.6 浏览器支持硬门禁",
                                                        "15 WP-7"
                                                    ],
                      "modules":  [
                                      "release-ci",
                                      "supervisor",
                                      "web",
                                      "api",
                                      "worker"
                                  ],
                      "implementation_boundary":  "从候选便携包和当前安装的真实 Chrome/Edge 可执行文件生成 artifacts/tdd/\u003crun_id\u003e/release-candidate.json，记录 Windows build、品牌、major、full version、记录时间、候选制品哈希和固定端口；生成候选 ZIP 与候选 START-HERE.txt，但不写最终 RELEASE.json",
                      "parent_families":  [

                                          ],
                      "case_ids":  [

                                   ],
                      "first_red":  [

                                    ],
                      "minimal_green":  [

                                        ],
                      "task_green_gate":  "候选记录字段完整、脱敏且与候选制品一致；只作为后续精确环境输入，不能标记发布冻结或替代最终 RELEASE 证据",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-ci, supervisor, web, api, worker.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "credential, path, log, package and diagnostic redaction boundaries",
                                                                   "candidate record must remain distinct from final RELEASE.json"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "PKG-SEC",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/release-candidate.json",
                                                   "artifacts/tdd/\u003crun_id\u003e/candidate-package/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP7-02",
                      "work_package":  "WP-7",
                      "title":  "三模型真实契约验收",
                      "dependencies":  {
                                           "source_text":  "TASK-WP7-01、WP-3 Green、受控凭据",
                                           "task_ids":  [
                                                            "TASK-WP7-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-3"
                                                             ]
                                       },
                      "requirements":  [
                                           "GEN-13"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-40",
                                                  "AC-41"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "GEN-13、AC-40、41"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "8.3 契约验证证据",
                                                        "15 WP-7"
                                                    ],
                      "modules":  [
                                      "release-validation",
                                      "ai-adapters",
                                      "windows-credential-manager"
                                  ],
                      "implementation_boundary":  "对三个模型分别运行纯文字、参考图、四比例、同步/异步、响应、九类错误、结算和契约变化重验，保存脱敏证据",
                      "parent_families":  [
                                              "TDD-WP7-EXT-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP7-EXT-001-three-real-models"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP7-EXT-001",
                                            "assertion":  "任一模型缺独立真实契约证据"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP7-EXT-001",
                                                "assertion":  "三模型各自完成纯文字、参考图、四比例、同步/异步、响应、九类错误和结算证据"
                                            }
                                        ],
                      "task_green_gate":  "每个模型独立证据齐全且匹配最后配置；任一失败保持 externally_blocked；不共享 verified 标记",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-validation, ai-adapters, windows-credential-manager.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "EXT-REAL",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gemini-3.1-flash-image-preview",
                                                  "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gemini-3-pro-image-preview",
                                                  "pnpm validate:external -- --service \u003cai-gateway-service-id\u003e --model gpt-image-2",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-EXT-001-three-real-models/"
                                               ],
                      "automation":  [
                                         "controlled_real",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP7-03",
                      "work_package":  "WP-7",
                      "title":  "Resend 真实发布门槛",
                      "dependencies":  {
                                           "source_text":  "TASK-WP7-01、WP-1/WP-6 Green、受控域名",
                                           "task_ids":  [
                                                            "TASK-WP7-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-1",
                                                                 "WP-6"
                                                             ]
                                       },
                      "requirements":  [
                                           "AUTH-01",
                                           "AUTH-02",
                                           "AUTH-07"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-01",
                                                  "AC-33",
                                                  "AC-41",
                                                  "AC-47",
                                                  "AC-49"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "AUTH-01、02、07、AC-01、33、41、47、49"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "1.4 外部产品发布阻塞与可并行范围",
                                                        "11.1 Resend",
                                                        "15 WP-7"
                                                    ],
                      "modules":  [
                                      "release-validation",
                                      "resend-adapter",
                                      "windows-credential-manager"
                                  ],
                      "implementation_boundary":  "核验 SPF/DKIM、免费规则；QQ/163/企业邮箱各 20 封至少 19 封在 2 分钟内送达；用正式链完成普通/管理员认证",
                      "parent_families":  [
                                              "TDD-WP7-EXT-002"
                                          ],
                      "case_ids":  [
                                       "TDD-WP7-EXT-002-real-resend"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP7-EXT-002",
                                            "assertion":  "Resend 域名/免费规则/送达门槛未证实"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP7-EXT-002",
                                                "assertion":  "依据 PRD 第 23.2 节、AC-41、AC-47 与 DevelopmentPlan 第 1.4、11.1 节：SPF/DKIM；QQ、163、企业邮箱各 20 封至少 19 封在 2 分钟内送达；正式账号真实认证"
                                            }
                                        ],
                      "task_green_gate":  "人工统计脱敏；开发预置账号和 mock 不能作为证据；未达门槛不启动实际 P0-A 验收",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-validation, resend-adapter, windows-credential-manager.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "EXT-REAL",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm validate:external -- --service \u003cresend-service-id\u003e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-EXT-002-real-resend/"
                                               ],
                      "automation":  [
                                         "controlled_real",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "user-auth",
                                           "role":  "final_evidence",
                                           "frames":  [
                                                          {
                                                              "frame_id":  "Z0pf8",
                                                              "frame_name":  "01A 普通用户登录",
                                                              "primary_task":  "TASK-WP1-02",
                                                              "mapped_state_scope":  "登录正常；字段初始空；发码/登录加载；验证码、Resend 和身份状态失败；管理员入口、固定本机提示、艺术带与焦点"
                                                          },
                                                          {
                                                              "frame_id":  "DVPM8",
                                                              "frame_name":  "01B 注册展开态",
                                                              "primary_task":  "TASK-WP1-03",
                                                              "mapped_state_scope":  "邀请与邮箱已验证摘要；资料和告知未完成/完成；注册中；名额、邀请、验证码和提交失败；主动作禁用"
                                                          }
                                                      ],
                                           "applicable_states":  {
                                                                     "page_id":  "user-auth",
                                                                     "actor_entry":  "未登录普通入口",
                                                                     "normal":  "登录、分阶段注册、管理员文字入口、固定本机提示",
                                                                     "empty_loading":  "字段初始空；发码/验证/注册加载",
                                                                     "failure_disabled":  "Resend、验证码、邀请、名额、告知未完成；按钮禁用",
                                                                     "conflict_capacity_special":  "N/A：认证不消费存储容量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/user-auth/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-auth",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP1-04",
                                                          "mapped_state_scope":  "白名单邮箱验证码、字段空/加载、非白名单、停用/移除、Resend 失败；独立 audience 与返回普通登录"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-auth",
                                                                     "actor_entry":  "未登录后台入口",
                                                                     "normal":  "白名单邮箱验证码、独立 audience、返回普通登录",
                                                                     "empty_loading":  "字段空；发码/登录中",
                                                                     "failure_disabled":  "非白名单发码前阻断、停用/移除白名单、Resend 错误",
                                                                     "conflict_capacity_special":  "N/A：不显示普通创作或容量业务"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-auth/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP7-04",
                      "work_package":  "WP-7",
                      "title":  "高德真实发布门槛",
                      "dependencies":  {
                                           "source_text":  "TASK-WP7-01、WP-4/WP-6 Green、受控 Key",
                                           "task_ids":  [
                                                            "TASK-WP7-01"
                                                        ],
                                           "work_packages":  [
                                                                 "WP-4",
                                                                 "WP-6"
                                                             ]
                                       },
                      "requirements":  [
                                           "DYN-04",
                                           "PRIV-03"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-17",
                                                  "AC-41",
                                                  "AC-47"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "DYN-04、PRIV-03、AC-17、41、47"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "1.4 外部产品发布阻塞与可并行范围",
                                                        "11.2 高德",
                                                        "15 WP-7"
                                                    ],
                      "modules":  [
                                      "release-validation",
                                      "amap-adapter",
                                      "windows-credential-manager"
                                  ],
                      "implementation_boundary":  "核验定位/逆地理、QPS、白名单、安全限制、每月 1,000 次硬停止和 DYN004 确认流程",
                      "parent_families":  [
                                              "TDD-WP7-EXT-003"
                                          ],
                      "case_ids":  [
                                       "TDD-WP7-EXT-003-real-amap"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP7-EXT-003",
                                            "assertion":  "高德接口、绑定、安全限制或 1,000 次硬上限未证实"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP7-EXT-003",
                                                "assertion":  "定位/逆地理、QPS、白名单、安全和应用硬停止实测通过"
                                            }
                                        ],
                      "task_green_gate":  "真实测试坐标不关联真实项目；不发第 1001 次；不启用付费或自动扩容；失败保持 externally_blocked",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-validation, amap-adapter, windows-credential-manager.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "EXT-REAL",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm validate:external -- --service \u003camap-service-id\u003e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-EXT-003-real-amap/"
                                               ],
                      "automation":  [
                                         "controlled_real",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP7-05",
                      "work_package":  "WP-7",
                      "title":  "候选精确环境 UI、视觉、性能与可访问性验收",
                      "dependencies":  {
                                           "source_text":  "TASK-WP7-01 至 TASK-WP7-04",
                                           "task_ids":  [
                                                            "TASK-WP7-01",
                                                            "TASK-WP7-04"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-02",
                                           "NFR-06"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-24",
                                                  "AC-25",
                                                  "AC-32",
                                                  "AC-41",
                                                  "AC-55",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "UIDesign 全页、NFR-02、06、AC-24、25、32、41、55、56"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "3.6 浏览器支持硬门禁",
                                                        "13 性能、可访问性与视觉一致性",
                                                        "15 WP-7"
                                                    ],
                      "modules":  [
                                      "release-validation",
                                      "web",
                                      "web-editor",
                                      "supervisor"
                                  ],
                      "implementation_boundary":  "严格使用候选记录中的两个真实 full version，在 1920×1080、DPR 1、100%/200% 下重跑 AC-24、AC-32、全部 E2E、视觉、性能、下载、文件选择和逐个非 N/A 页面状态；按 frame 对照低保真",
                      "parent_families":  [
                                              "TDD-WP7-UI-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP7-UI-001-page-state-evidence"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP7-UI-001",
                                            "assertion":  "UIDesign 页面/入口或适用状态无实现落点，或 1080p/200% 出现遮挡"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP7-UI-001",
                                                "assertion":  "第 11.1 节页面 × 状态矩阵全部适用单元格有证据；Pencil 仅作布局参考，Canvas Index 不计产品实现；固定文案、焦点、状态、控件和无重叠检查通过"
                                            }
                                        ],
                      "task_green_gate":  "22 个 coverage unit 全部有证据；候选环境与记录任何漂移均使本任务重跑；无独立 Pencil frame 的页面不漏测；Canvas Index 不计产品页",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-validation, web, web-editor, supervisor.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "E2E",
                                     "VIS-PERF",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:e2e",
                                                  "pnpm test:visual",
                                                  "pnpm test:performance",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-UI-001-page-state-evidence/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "support-gate",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "u1adni",
                                                          "frame_name":  "07A 浏览器硬阻断",
                                                          "primary_task":  "TASK-WP0-03",
                                                          "mapped_state_scope":  "四种阻断 reason、支持品牌/major、最小诊断；bundle/API 无绕过；无业务空态、身份或容量读取"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "support-gate",
                                                                     "actor_entry":  "所有主体，产品门禁前",
                                                                     "normal":  "四种阻断 reason、支持品牌/major、无继续入口",
                                                                     "empty_loading":  "N/A：引导无业务空态；身份不可判定属于阻断",
                                                                     "failure_disabled":  "bundle/API 均无法绕过；诊断仅最小字段",
                                                                     "conflict_capacity_special":  "N/A：不读取业务状态或容量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/support-gate/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "user-auth",
                                           "role":  "final_evidence",
                                           "frames":  [
                                                          {
                                                              "frame_id":  "Z0pf8",
                                                              "frame_name":  "01A 普通用户登录",
                                                              "primary_task":  "TASK-WP1-02",
                                                              "mapped_state_scope":  "登录正常；字段初始空；发码/登录加载；验证码、Resend 和身份状态失败；管理员入口、固定本机提示、艺术带与焦点"
                                                          },
                                                          {
                                                              "frame_id":  "DVPM8",
                                                              "frame_name":  "01B 注册展开态",
                                                              "primary_task":  "TASK-WP1-03",
                                                              "mapped_state_scope":  "邀请与邮箱已验证摘要；资料和告知未完成/完成；注册中；名额、邀请、验证码和提交失败；主动作禁用"
                                                          }
                                                      ],
                                           "applicable_states":  {
                                                                     "page_id":  "user-auth",
                                                                     "actor_entry":  "未登录普通入口",
                                                                     "normal":  "登录、分阶段注册、管理员文字入口、固定本机提示",
                                                                     "empty_loading":  "字段初始空；发码/验证/注册加载",
                                                                     "failure_disabled":  "Resend、验证码、邀请、名额、告知未完成；按钮禁用",
                                                                     "conflict_capacity_special":  "N/A：认证不消费存储容量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/user-auth/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "workspace",
                                           "role":  "final_evidence",
                                           "frames":  [
                                                          {
                                                              "frame_id":  "WbDYT",
                                                              "frame_name":  "02A 空工作台",
                                                              "primary_task":  "TASK-WP2-01",
                                                              "mapped_state_scope":  "无项目艺术带；生成表单、推荐模型、四比例与空任务；模型/项目加载；模型、点数、参考图和容量禁用"
                                                          },
                                                          {
                                                              "frame_id":  "d99Lo",
                                                              "frame_name":  "02B 生成中工作台",
                                                              "primary_task":  "TASK-WP2-05",
                                                              "mapped_state_scope":  "queued/running 无假百分比；冻结点数；critical 容量条；第二次提交禁用；失败/rejected 动作和配置变化重确认"
                                                          }
                                                      ],
                                           "applicable_states":  {
                                                                     "page_id":  "workspace",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "生成表单、模型/点数/比例、最近项目",
                                                                     "empty_loading":  "无项目艺术带；模型/项目加载",
                                                                     "failure_disabled":  "服务/参考图/生成错误；模型、点数、单任务、历史/项目上限禁用",
                                                                     "conflict_capacity_special":  "model config 变化重确认；warning/critical 提示；full/unavailable 阻断新增"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/workspace/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "current-task",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "d99Lo",
                                                          "frame_name":  "02B 生成中工作台",
                                                          "primary_task":  "TASK-WP2-05",
                                                          "mapped_state_scope":  "queued/running 无假百分比；冻结点数；critical 容量条；第二次提交禁用；失败/rejected 动作和配置变化重确认"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "current-task",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "真实状态、结果入口",
                                                                     "empty_loading":  "无活动任务；queued/running 无假百分比",
                                                                     "failure_disabled":  "failed/rejected 与九类固定动作；第二任务禁用",
                                                                     "conflict_capacity_special":  "storage 错误按任务真相；pending_manual_review 不作为用户任务状态；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/current-task/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "projects",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "zXyG9",
                                                          "frame_name":  "03A 项目列表",
                                                          "primary_task":  "TASK-WP2-01",
                                                          "mapped_state_scope":  "active/trashed、筛选、多选 failed_empty；空/骨架；20 active、恢复/批量禁用；多标签和容量提示"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "projects",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "active/trashed 列表、筛选、多选 failed_empty",
                                                                     "empty_loading":  "无项目/筛选空；稳定卡片骨架",
                                                                     "failure_disabled":  "列表失败保留旧数据；20 active、恢复/批量条件禁用",
                                                                     "conflict_capacity_special":  "多标签版本提示；删除排队不乐观减容量；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/projects/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "project-detail",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "v2Qbu",
                                                          "frame_name":  "03B 项目详情",
                                                          "primary_task":  "TASK-WP2-01",
                                                          "mapped_state_scope":  "历史、固定比例、继续生成、编辑、原图/latest；无成功图/无成品；10 图上限、资源失败和容量状态"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "project-detail",
                                                                     "actor_entry":  "项目所有者",
                                                                     "normal":  "历史、固定比例、继续生成、编辑、原图/latest 下载",
                                                                     "empty_loading":  "无成功图草稿；历史/成品加载",
                                                                     "failure_disabled":  "10 图上限、当前底图不可删、无 latest、资源读取失败",
                                                                     "conflict_capacity_special":  "比例不可改；清理/容量状态不伪造资源可用性；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/project-detail/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "editor",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "bHQnJ",
                                                          "frame_name":  "04A 三栏编辑器",
                                                          "primary_task":  "TASK-WP4-01",
                                                          "mapped_state_scope":  "三栏、保存状态、画布、对象属性与固定底栏；画布/素材加载；保存/素材失败；第 51 元素；conflicted/full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "editor",
                                                                     "actor_entry":  "有成功底图的项目所有者",
                                                                     "normal":  "三栏、保存状态、画布、属性与素材",
                                                                     "empty_loading":  "画布/素材加载；无成功图不能正常进入",
                                                                     "failure_disabled":  "保存/素材失败；第 51 元素、不可用模板禁用",
                                                                     "conflict_capacity_special":  "dirty/saving/saved/failed；conflicted 只读；full 可存 JSON，unavailable 保存失败"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/editor/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "export",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "i9upg7",
                                                          "frame_name":  "04B 导出弹层",
                                                          "primary_task":  "TASK-WP4-05",
                                                          "mapped_state_scope":  "JPG/PNG、质量、尺寸；合成/持久化加载；未提交确认；四类失败结果；冲突一次下载和 full/unavailable"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "export",
                                                                     "actor_entry":  "编辑器内项目所有者",
                                                                     "normal":  "JPG/PNG、质量、尺寸、下载/latest 分结果",
                                                                     "empty_loading":  "合成/持久化加载；无业务空态",
                                                                     "failure_disabled":  "合成、下载、项目保存、latest 保存分别失败；无画布/冲突次数用尽禁用",
                                                                     "conflict_capacity_special":  "未提交确认；conflicted 仅一次本地导出；full/unavailable 后端失败不撤回下载"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/export/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "credits",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "YlKzE",
                                                          "frame_name":  "05A 点数明细",
                                                          "primary_task":  "TASK-WP2-04",
                                                          "mapped_state_scope":  "available/reserved、流水和分页；无流水/加载；失败保留安全摘要；负 available 如实显示且无购买入口"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "credits",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "available/reserved、流水、关联与时间",
                                                                     "empty_loading":  "无流水；分页加载",
                                                                     "failure_disabled":  "加载失败保留安全余额摘要",
                                                                     "conflict_capacity_special":  "负 available 如实显示；无购买/充值入口；页面操作不消费容量但仍继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/credits/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "settings",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "Ws5E0",
                                                          "frame_name":  "05B 设置与本机数据",
                                                          "primary_task":  "TASK-WP1-05",
                                                          "mapped_state_scope":  "资料、本机数据、容量摘要和固定文案；加载/保存失败；full/unavailable；注销确认、处理中和返回登录"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "settings",
                                                                     "actor_entry":  "active 普通/内部预览账号",
                                                                     "normal":  "资料、本机数据、容量摘要、固定文案、注销",
                                                                     "empty_loading":  "资料/状态加载",
                                                                     "failure_disabled":  "保存失败；注销确认/处理中禁用重复提交",
                                                                     "conflict_capacity_special":  "full/unavailable 状态与允许动作；注销后返回登录"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/settings/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "preview-user-variant",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP5-07",
                                                          "mapped_state_scope":  "有效授权、无授权/空批次、加载、撤销/过期阻断；不出现后台权限；全局容量条"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "preview-user-variant",
                                                                     "actor_entry":  "有有效/撤销/过期 AssetPreviewGrant 的普通账号",
                                                                     "normal":  "授权批次素材显示“预览”，其余页面同普通用户",
                                                                     "empty_loading":  "无授权/批次空；manifest 加载",
                                                                     "failure_disabled":  "撤销/过期立即阻断新读取",
                                                                     "conflict_capacity_special":  "不出现后台入口、调点、邀请码、模型或私有内容；继承普通端全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/preview-user-variant/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-auth",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP1-04",
                                                          "mapped_state_scope":  "白名单邮箱验证码、字段空/加载、非白名单、停用/移除、Resend 失败；独立 audience 与返回普通登录"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-auth",
                                                                     "actor_entry":  "未登录后台入口",
                                                                     "normal":  "白名单邮箱验证码、独立 audience、返回普通登录",
                                                                     "empty_loading":  "字段空；发码/登录中",
                                                                     "failure_disabled":  "非白名单发码前阻断、停用/移除白名单、Resend 错误",
                                                                     "conflict_capacity_special":  "N/A：不显示普通创作或容量业务"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-auth/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-overview",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "e4e2Kz",
                                                          "frame_name":  "06A 后台总览",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "名额、任务、成本核对、服务/容量和审计摘要；骨架/空事件；聚合失败；三模型状态分列和待处理事项"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-overview",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "名额、任务、模型、点数、服务、容量、审计摘要",
                                                                     "empty_loading":  "无近期事件；指标骨架",
                                                                     "failure_disabled":  "聚合失败保留旧值和时间；敏感动作按状态禁用",
                                                                     "conflict_capacity_special":  "default/runtime/recommended 分列；pending_manual_review 为成本核对；容量持续条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-overview/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-users",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "脱敏列表/详情、暂停恢复/调点、空/筛选空/骨架、原因缺失和状态禁用、负 available"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-users",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "脱敏列表/详情、暂停恢复、调点",
                                                                     "empty_loading":  "无用户/筛选空；表格骨架",
                                                                     "failure_disabled":  "操作失败、原因缺失、状态前置禁用",
                                                                     "conflict_capacity_special":  "调点可使 available 为负但 reserved 不变；页面操作不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-users/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-invites",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP6-01",
                                                          "mapped_state_scope":  "创建/停用/期限/次数/脱敏复制、空/骨架、名额满、过期/耗尽、请求失败和幂等/CAS 结果"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-invites",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "创建、停用、期限/次数、脱敏复制",
                                                                     "empty_loading":  "无邀请码；表格骨架",
                                                                     "failure_disabled":  "名额满、停用/过期/耗尽不可当可用；请求失败",
                                                                     "conflict_capacity_special":  "CAS/幂等结果；页面操作不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-invites/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-models",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "YVfVG",
                                                          "frame_name":  "06B 模型配置",
                                                          "primary_task":  "TASK-WP6-05",
                                                          "mapped_state_scope":  "完整三模型集合、default/runtime/recommended；加载；空推荐；替代/priority 禁用；CAS 冲突和整套回滚"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-models",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "完整三模型集合、default/runtime/recommended 三层",
                                                                     "empty_loading":  "初始加载骨架；无 recommended 是合法状态",
                                                                     "failure_disabled":  "合法替代/priority 前置禁用；契约未验证/运行时不可用",
                                                                     "conflict_capacity_special":  "config_set CAS 冲突、完整集合原子回滚；仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-models/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-assets",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "A28V3c",
                                                          "frame_name":  "06C 素材与历史清理",
                                                          "primary_task":  "TASK-WP5-06",
                                                          "mapped_state_scope":  "上传/版本/候选；无上传/无候选；格式/编译/权限失败；full/unavailable；引用冲突、排队、物理删除和重计量"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-assets",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "普通贴纸、资源版本/发布、历史清理",
                                                                     "empty_loading":  "无上传素材/无候选；列表/处理加载",
                                                                     "failure_disabled":  "格式/编译失败；权限、文件状态禁用",
                                                                     "conflict_capacity_special":  "stable ID/version 冲突；full/unavailable 阻断上传；引用冲突/排队/重计量"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-assets/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-preview",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "UIDesign-only",
                                                          "frame_name":  "无独立画板",
                                                          "primary_task":  "TASK-WP5-07",
                                                          "mapped_state_scope":  "批次、模板状态、授权/撤销/到期、空/骨架、非法转换/发布失败；不出现 P0-B 全量开放"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-preview",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "批次、模板状态、账号授权/撤销/到期",
                                                                     "empty_loading":  "无批次/授权；表格骨架",
                                                                     "failure_disabled":  "非法状态转换、过期、发布校验失败",
                                                                     "conflict_capacity_special":  "授权不改变角色；P0-B 全量开放不可在 P0-A 出现；继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-preview/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-generations",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "OnsiT",
                                                          "frame_name":  "06D 生成记录与私有告知",
                                                          "primary_task":  "TASK-WP6-02",
                                                          "mapped_state_scope":  "默认隐藏正文；身份+版本告知；逐次打开；空记录/审计写入加载；428、审计失败、升版重阻断"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-generations",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "默认安全摘要、告知、逐次打开",
                                                                     "empty_loading":  "无记录；列表/审计写入加载",
                                                                     "failure_disabled":  "未确认 428、审计失败不打开、权限禁用",
                                                                     "conflict_capacity_special":  "告知升版重阻断；每次打开先独立审计；页面读取不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-generations/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-services-storage",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "L3lde2",
                                                          "frame_name":  "06E 服务与存储",
                                                          "primary_task":  "TASK-WP6-05",
                                                          "mapped_state_scope":  "Resend/高德/网关/Worker/LocalDataRoot；指标加载；paused/degraded/unavailable；恢复前置、清理排队和重计量"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-services-storage",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "Resend/高德/网关/Worker/LocalDataRoot 状态与允许动作",
                                                                     "empty_loading":  "指标加载；无告警",
                                                                     "failure_disabled":  "paused/degraded/unavailable；不合法恢复/提高上限禁用",
                                                                     "conflict_capacity_special":  "full/unavailable、清理排队和物理重计量；不显示绝对路径"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-services-storage/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "admin-audit",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "DlCpN",
                                                          "frame_name":  "06F 私有内容访问审计",
                                                          "primary_task":  "TASK-WP6-04",
                                                          "mapped_state_scope":  "两类独立审计、游标和 180 天；空/加载；查询失败；不可编辑删除；无正文、图片、密钥和路径"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "admin-audit",
                                                                     "actor_entry":  "active super_admin",
                                                                     "normal":  "后台操作与私有访问两类独立页/标签",
                                                                     "empty_loading":  "无记录；游标加载",
                                                                     "failure_disabled":  "查询失败保留旧结果；无修改/人工删除动作",
                                                                     "conflict_capacity_special":  "180 天保留；正文、图片、密钥和路径不出现；页面读取不消费容量但仍继承后台全局容量条"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/admin-audit/\u003cstate\u003e/"
                                       },
                                       {
                                           "page_id":  "system-ui",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "awt96",
                                                          "frame_name":  "07B Windows 辅助系统界面",
                                                          "primary_task":  "TASK-WP0-07",
                                                          "mapped_state_scope":  "托盘/启动中/ready；启动失败、端口占用、API/Worker degraded；脱敏诊断；full/unavailable 告警与受限动作"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "system-ui",
                                                                     "actor_entry":  "本机托盘/Supervisor，无产品角色",
                                                                     "normal":  "托盘、运行状态、打开 Dada、诊断、退出",
                                                                     "empty_loading":  "启动中；N/A 业务空态",
                                                                     "failure_disabled":  "启动失败、端口占用、API/Worker degraded，动作严格受限",
                                                                     "conflict_capacity_special":  "full/unavailable 只作脱敏告警；固定端口不动态切换"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  },
                  {
                      "task_id":  "TASK-WP7-06",
                      "work_package":  "WP-7",
                      "title":  "追踪闭环与最终 AC 预冻结验收",
                      "dependencies":  {
                                           "source_text":  "TASK-WP7-01 至 TASK-WP7-05",
                                           "task_ids":  [
                                                            "TASK-WP7-01",
                                                            "TASK-WP7-05"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-05"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-01",
                                                  "AC-02",
                                                  "AC-03",
                                                  "AC-04",
                                                  "AC-05",
                                                  "AC-06",
                                                  "AC-07",
                                                  "AC-09",
                                                  "AC-10",
                                                  "AC-11",
                                                  "AC-12",
                                                  "AC-13",
                                                  "AC-14",
                                                  "AC-15",
                                                  "AC-16",
                                                  "AC-17",
                                                  "AC-18",
                                                  "AC-19",
                                                  "AC-20",
                                                  "AC-21",
                                                  "AC-22",
                                                  "AC-23",
                                                  "AC-24",
                                                  "AC-25",
                                                  "AC-27",
                                                  "AC-28",
                                                  "AC-29",
                                                  "AC-30",
                                                  "AC-31",
                                                  "AC-32",
                                                  "AC-33",
                                                  "AC-34",
                                                  "AC-35",
                                                  "AC-36",
                                                  "AC-38",
                                                  "AC-39",
                                                  "AC-40",
                                                  "AC-41",
                                                  "AC-42",
                                                  "AC-43",
                                                  "AC-44",
                                                  "AC-45",
                                                  "AC-46",
                                                  "AC-47",
                                                  "AC-48",
                                                  "AC-49",
                                                  "AC-50",
                                                  "AC-51",
                                                  "AC-52",
                                                  "AC-53",
                                                  "AC-55",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-05、52 当前 AC、109 需求 ID、13 模块、19 契约、9 错误"
                                                 ],
                      "acceptance_scope_notes":  [
                                                     "NFR-05、52 当前 AC、109 需求 ID、13 模块、19 契约、9 错误"
                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "14 测试、监控与 AC 追踪",
                                                        "15 WP-7",
                                                        "19 完成定义"
                                                    ],
                      "modules":  [
                                      "release-validation",
                                      "trace-validator"
                                  ],
                      "implementation_boundary":  "运行 test:all 和 validate:tdd-trace；汇总候选制品、外部、UI/视觉/性能证据；用固定 super_admin/普通账号及正常链创建临时第二普通账号完成 52 AC；确认候选浏览器字段在验收期间未漂移",
                      "parent_families":  [
                                              "TDD-WP7-AC-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP7-AC-001-trace-structure"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP7-AC-001",
                                            "assertion":  "52 项 AC、89 个测试族或 117 个规范 case 缺失，重复主责、孤儿 case 或用 P0-B 结果冒充"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP7-AC-001",
                                                "assertion":  "第 12 节矩阵每项一个主责且证据齐全；89/89 父族有 case 且派生属性完整；未来四项不计入；四份全局来源哈希未变，UI 参考变化按第 1.2.2 节局部重验"
                                            }
                                        ],
                      "task_green_gate":  "52/52 当前 AC passed；109 需求 ID、13 模块、19 契约、9 错误、89/89 父族、117/117 case 完整；未来四项不计入；未通过时不得写最终 RELEASE.json",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-validation, trace-validator.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "UNIT",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:unit",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-AC-001-trace-structure/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [

                                   ],
                      "ui_scope_reason":  "No direct UI coverage-unit ownership; validate only the listed module and case boundaries."
                  },
                  {
                      "task_id":  "TASK-WP7-07",
                      "work_package":  "WP-7",
                      "title":  "最终 RELEASE 冻结、制品生成与泄漏扫描",
                      "dependencies":  {
                                           "source_text":  "TASK-WP7-06",
                                           "task_ids":  [
                                                            "TASK-WP7-06"
                                                        ],
                                           "work_packages":  [

                                                             ]
                                       },
                      "requirements":  [
                                           "NFR-01",
                                           "NFR-09",
                                           "PRIV-01",
                                           "PRIV-02"
                                       ],
                      "acceptance_criteria":  [
                                                  "AC-24",
                                                  "AC-41",
                                                  "AC-48",
                                                  "AC-56"
                                              ],
                      "acceptance_criteria_role":  "direct-or-supporting-as-listed-by-normative-cases",
                      "product_contracts":  [

                                            ],
                      "requirement_ac_sources":  [
                                                     "NFR-01、09、AC-24、41",
                                                     "PRIV-01、02、NFR-09、AC-41、48、56"
                                                 ],
                      "acceptance_scope_notes":  [

                                                 ],
                      "fixture_ids":  [

                                      ],
                      "development_plan_sections":  [
                                                        "3.1 便携包布局",
                                                        "3.6 浏览器支持硬门禁",
                                                        "12.3 审计与敏感信息",
                                                        "15 WP-7",
                                                        "19 完成定义"
                                                    ],
                      "modules":  [
                                      "release-ci",
                                      "trace-validator",
                                      "security-scanner",
                                      "supervisor",
                                      "web",
                                      "api",
                                      "worker"
                                  ],
                      "implementation_boundary":  "验收通过后把未漂移的候选浏览器记录写入最终 RELEASE.json，生成最终 ZIP、SHA-256 和 START-HERE.txt；把 RELEASE SHA-256 写入最终 evidence.json；扫描源码、Git、最终 ZIP、DB 配置、manifest、日志、截图、trace/evidence，并执行最终 package/support-gate smoke",
                      "parent_families":  [
                                              "TDD-WP7-REL-001",
                                              "TDD-WP7-SEC-001"
                                          ],
                      "case_ids":  [
                                       "TDD-WP7-REL-001-final-release-record",
                                       "TDD-WP7-SEC-001-artifact-leak-scan"
                                   ],
                      "first_red":  [
                                        {
                                            "family_id":  "TDD-WP7-REL-001",
                                            "assertion":  "RELEASE.json 缺失/漂移、ZIP 哈希或真实浏览器未验收"
                                        },
                                        {
                                            "family_id":  "TDD-WP7-SEC-001",
                                            "assertion":  "制品、日志、DB 配置、manifest 或文档出现真实敏感值/用户路径"
                                        }
                                    ],
                      "minimal_green":  [
                                            {
                                                "family_id":  "TDD-WP7-REL-001",
                                                "assertion":  "发布记录、制品、START-HERE、Chrome/Edge full version、固定 major 和 Windows build 一致"
                                            },
                                            {
                                                "family_id":  "TDD-WP7-SEC-001",
                                                "assertion":  "全制品扫描零命中；凭据只在 Windows Credential Manager；诊断脱敏"
                                            }
                                        ],
                      "task_green_gate":  "最终记录、制品、Windows build、两个 full version、固定 major 和端口一致；零真实敏感值/用户绝对路径；最终写入或扫描失败时不得发布，且不能沿用候选 passed 状态冒充最终冻结",
                      "refactor_scope":  {
                                             "allowed":  "Only internal deduplication and structural improvement inside modules: release-ci, trace-validator, security-scanner, supervisor, web, api, worker.",
                                             "must_preserve":  [
                                                                   "PRD product semantics and P0-A boundary",
                                                                   "UIDesign page states, message_key actions, focus, layout and visual/performance thresholds",
                                                                   "credential, path, log, package and diagnostic redaction boundaries"
                                                               ],
                                             "forbidden":  [
                                                               "new product routes, roles, states, fallback behavior or configuration",
                                                               "technology replacement or cross-module ownership change",
                                                               "weakening or deleting any assigned case assertion"
                                                           ]
                                         },
                      "layers":  [
                                     "PKG-SEC",
                                     "E2E",
                                     "MANUAL"
                                 ],
                      "validation_commands":  [
                                                  "pnpm test:security",
                                                  "pnpm test:package",
                                                  "pnpm test:e2e",
                                                  "pnpm validate:tdd-trace"
                                              ],
                      "evidence_directories":  [
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-REL-001-final-release-record/",
                                                   "artifacts/tdd/\u003crun_id\u003e/cases/TDD-WP7-SEC-001-artifact-leak-scan/"
                                               ],
                      "automation":  [
                                         "automated",
                                         "manual_review"
                                     ],
                      "release_gate":  [
                                           "release:P0-A"
                                       ],
                      "ui_scope":  [
                                       {
                                           "page_id":  "system-ui",
                                           "role":  "final_evidence",
                                           "frames":  {
                                                          "frame_id":  "awt96",
                                                          "frame_name":  "07B Windows 辅助系统界面",
                                                          "primary_task":  "TASK-WP0-07",
                                                          "mapped_state_scope":  "托盘/启动中/ready；启动失败、端口占用、API/Worker degraded；脱敏诊断；full/unavailable 告警与受限动作"
                                                      },
                                           "applicable_states":  {
                                                                     "page_id":  "system-ui",
                                                                     "actor_entry":  "本机托盘/Supervisor，无产品角色",
                                                                     "normal":  "托盘、运行状态、打开 Dada、诊断、退出",
                                                                     "empty_loading":  "启动中；N/A 业务空态",
                                                                     "failure_disabled":  "启动失败、端口占用、API/Worker degraded，动作严格受限",
                                                                     "conflict_capacity_special":  "full/unavailable 只作脱敏告警；固定端口不动态切换"
                                                                 },
                                           "evidence_directory":  "artifacts/tdd/\u003crun_id\u003e/ui/system-ui/\u003cstate\u003e/"
                                       }
                                   ],
                      "ui_scope_reason":  null
                  }
              ],
    "case_catalog":  [
                         {
                             "case_id":  "TDD-WP4-TXT-002-font-metrics-ranges",
                             "parent_family":  "TDD-WP4-TXT-002",
                             "requirement_ac_source":  "TEXT-07 至 14、NFR-02、AC-11、12",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "真实归档字体/缺失字体、最长文字、属性边界/步长",
                             "numbered_steps":  "1. 等待 FontFace ready；2. 参数化字号/缩放/行距/字距/描边/颜色/背景透明度；3. 完成；4. 缺字体加载；5. 重开/导出",
                             "expected_response_ui":  "字号与控制柄同步，重新测量不裁切；范围步长精确；缺字体模板 unavailable；背景透明度不影响文字",
                             "expected_db_files":  "完成一次撤销/保存；缺字体分支无 Canvas 新元素",
                             "forbidden_side_effects":  "不静默系统字体回退、不把背景透明度应用文字、不超范围取值",
                             "evidence_files":  "font-load.json、canvas-state.json、pixel-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP2-PROJ-004-stale-tab",
                             "parent_family":  "TDD-WP2-PROJ-004",
                             "requirement_ac_source":  "PROJECT-07、AC-36 P0-A 子集",
                             "fixture_ids":  [
                                                 "FX-PROJECT-CONFLICT"
                                             ],
                             "fixture_and_preconditions":  "FX-PROJECT-CONFLICT，标签 A/B 均基于 N",
                             "numbered_steps":  "1. A 保存到 N+1；2. B 以 N 保存；3. B 尝试编辑/覆盖/另存副本",
                             "expected_response_ui":  "B 返回 412 和最新安全版本摘要；立即只读 conflicted，只显示一次本地导出与刷新",
                             "expected_db_files":  "仅 A 状态写入；B 的 state_version/save_status/latest_exports/project 数量不变",
                             "forbidden_side_effects":  "B 不自动重试覆盖、不 merge、不另存项目、不恢复自动保存",
                             "evidence_files":  "两标签 response.json、db-diff.json、trace.zip、screenshots/conflicted.png"
                         },
                         {
                             "case_id":  "TDD-WP6-PRIV-001-ack",
                             "parent_family":  "TDD-WP6-PRIV-001",
                             "requirement_ac_source":  "ADMIN-05、17.1、AC-25",
                             "fixture_ids":  [
                                                 "FX-ACTOR-ADMIN-A"
                                             ],
                             "fixture_and_preconditions":  "FX-ACTOR-ADMIN-A 未确认 current notice v1",
                             "numbered_steps":  "1. 进入私有区域；2. 得到 428；3. 以 expected v1 调 notice ack；4. 重试区域摘要",
                             "expected_response_ui":  "首次 428 PRIVATE_CONTENT_NOTICE_ACK_REQUIRED 只含 version/message_key；ack 成功后区域仅显示安全摘要",
                             "expected_db_files":  "只更新该 admin 的 notice version/ack time；幂等重试不新增语义变化",
                             "forbidden_side_effects":  "ack 不创建 PrivateContentAccessLog；不返回正文/图片；不写 Cookie/localStorage 作为真相",
                             "evidence_files":  "response.json、db-diff.json、trace.zip、screenshots/notice.png"
                         },
                         {
                             "case_id":  "TDD-WP6-PRIV-001-persistence",
                             "parent_family":  "TDD-WP6-PRIV-001",
                             "requirement_ac_source":  "ADMIN-05、AC-25",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "admin A 已确认 v1",
                             "numbered_steps":  "1. 新标签；2. API 重启；3. 浏览器重启/重登；4. 在真实 Chrome 与 Edge 登录同一 admin",
                             "expected_response_ui":  "同版本均不重复提示，session/bootstrap 计算 notice_acknowledged=true",
                             "expected_db_files":  "UserProfile ack 字段不因浏览器/会话改变；每次 session 独立但 ack 不重复写",
                             "forbidden_side_effects":  "Cookie/session/localStorage/IndexedDB 清空不使服务端遗忘；跨管理员不共享 ack",
                             "evidence_files":  "每环境 response.json、db-diff.json、trace.zip、screenshots/ack-persisted.png"
                         },
                         {
                             "case_id":  "TDD-WP5-PREV-001-grant-lifecycle",
                             "parent_family":  "TDD-WP5-PREV-001",
                             "requirement_ac_source":  "ADMIN-07、17.13、AC-42、48",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "普通账号，active/revoked/expired grant，已有项目引用预览版本",
                             "numbered_steps":  "1. admin 授权批次；2. 用户读取/添加；3. 撤销/到期；4. 再读取/添加；5. 重开已有项目",
                             "expected_response_ui":  "active 时只见授权项；撤销/到期立即阻断新读取/添加；已有项目按保存版本渲染",
                             "expected_db_files":  "grant 状态/审计更新；UserProfile.role 不变；项目引用版本不改写",
                             "forbidden_side_effects":  "不出现后台权限、不把 preview 写 public manifest/cache、不因撤销破坏既有项目",
                             "evidence_files":  "response.json、db-diff.json、cache-enumeration.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP5-COL-001-four-layouts",
                             "parent_family":  "TDD-WP5-COL-001",
                             "requirement_ac_source":  "COL-01 至 05、AC-15 P0-A 子集、16、32",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "COLOR001/002/008/016 与同一五色 fixture",
                             "numbered_steps":  "1. 渲染四卡；2. 改裁剪/滤镜；3. 换底图；4. 尝试访问其他色卡",
                             "expected_response_ui":  "四布局消费完全相同五色；刷新规则一致；其他色卡不可发现",
                             "expected_db_files":  "只保存稳定 ID/version/五色 snapshot",
                             "forbidden_side_effects":  "不启用其余 12 色卡、不各自重新提色、不联网读取图片",
                             "evidence_files":  "palette.json、pixel-diff.json、manifest.json"
                         },
                         {
                             "case_id":  "TDD-WP2-PROJ-002-save-failure-recovery",
                             "parent_family":  "TDD-WP2-PROJ-002",
                             "requirement_ac_source":  "PROJECT-04、05、EXPORT-06、AC-20、35",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "saved N；页面创建 dirty；参数化网络失败、storage unavailable、强制刷新/崩溃",
                             "numbered_steps":  "1. 触发保存失败；2. 检查 failed/离开弹层；3. 页面保持时恢复并重试；4. 另一路强制退出后重开；5. 枚举浏览器存储",
                             "expected_response_ui":  "失败不显示 saved；正常恢复可保存；强制退出只恢复后端 N 且撤销栈为空",
                             "expected_db_files":  "失败期间 DB 不变；成功重试才 N+1；浏览器持久存储无草稿/提示词/私有引用",
                             "forbidden_side_effects":  "不把失败当成功；不在关闭后恢复内存草稿；不让 SSE 代替 REST 真相",
                             "evidence_files":  "response.json、db-diff.json、cache-enumeration.json、trace.zip、screenshots/save-failed.png"
                         },
                         {
                             "case_id":  "TDD-WP6-PRIV-001-version-bump",
                             "parent_family":  "TDD-WP6-PRIV-001",
                             "requirement_ac_source":  "ADMIN-05、AC-25",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "admin A/B 已确认 v1，应用 current notice 切到 v2",
                             "numbered_steps":  "1. 两个 admin 分别进入区域；2. 尝试用 expected v1 ack；3. 读取 v2 并确认",
                             "expected_response_ui":  "两者重新 428；旧 expected version 失败且要求重读；各自确认 v2 后可进入摘要",
                             "expected_db_files":  "旧 ack 保留历史语义但当前字段仅在正确 v2 ack 后更新；A/B 独立",
                             "forbidden_side_effects":  "不以旧确认放行；不因 A 确认替 B 确认；不返回私有正文",
                             "evidence_files":  "response.json、db-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP0-DEP-001-frozen-toolchain",
                             "parent_family":  "TDD-WP0-DEP-001",
                             "requirement_ac_source":  "NFR-09、DevelopmentPlan 2.1、13.1",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "冻结 lockfile、干净离线依赖缓存、win-x64 runner",
                             "numbered_steps":  "1. 严格按 lockfile 安装；2. 编译 TypeScript；3. 最小加载 React/Fabric/Fastify/better-sqlite3；4. 用随包 Node 运行 native smoke",
                             "expected_response_ui":  "所有命令退出 0，版本与 lockfile/DevelopmentPlan 一致",
                             "expected_db_files":  "只生成声明的构建缓存与报告；业务 DB/LocalDataRoot 无变化",
                             "forbidden_side_effects":  "不升级/替换依赖、技术栈或 native 模块；不联网漂移解析版本",
                             "evidence_files":  "commands.json、dependency-tree.json、native-smoke.json"
                         },
                         {
                             "case_id":  "TDD-WP0-STO-002-equal-limit",
                             "parent_family":  "TDD-WP0-STO-002",
                             "requirement_ac_source":  "17.19、NFR-05、AC-55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "已计量+活动预留=5,368,709,119，预计写 1 字节，可写目录",
                             "numbered_steps":  "1. 调受管二进制写入预检；2. 提交文件/DB；3. 重读 storage state",
                             "expected_response_ui":  "不得返回 507；写入成功后 notice/status 为 full",
                             "expected_db_files":  "建立并消费一份 reservation；managed bytes 精确为 5,368,709,120；managed file 已提交；last_measured_at 更新",
                             "forbidden_side_effects":  "不用 \u003e= 拒绝；不回滚已成功等号写入；不调用自动清理",
                             "evidence_files":  "response.json、db-diff.json、fs-before.json、fs-after.json"
                         },
                         {
                             "case_id":  "TDD-WP1-AUTH-004-session-revocation",
                             "parent_family":  "TDD-WP1-AUTH-004",
                             "requirement_ac_source":  "AUTH-04 至 07、AC-22、33、49",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "每个参数使用独立库：active 普通用户或 active super_admin 各有 2 个 session",
                             "numbered_steps":  "1. 验证正常 session；2. 分别触发普通用户 logout/暂停/注销或管理员 logout/停用/移出白名单；3. 再调受保护 API",
                             "expected_response_ui":  "撤销前成功；每种撤销后均为 401 或相应身份入口，已打开页面退出旧数据；两种 audience 不能互用",
                             "expected_db_files":  "相应主体全部 session revoked_at 在同一事务写入；账号/白名单状态按触发操作变化",
                             "forbidden_side_effects":  "不只撤销当前浏览器；不把普通 session 提升为后台 session；不保留可交互私有响应",
                             "evidence_files":  "每参数 response.json、db-diff.json、trace.zip、screenshots/revoked.png"
                         },
                         {
                             "case_id":  "TDD-WP0-API-001-schema-envelope",
                             "parent_family":  "TDD-WP0-API-001",
                             "requirement_ac_source":  "NFR-05、DevelopmentPlan 6.1、6.6",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "生成 TypeBox/OpenAPI/客户端 snapshot；合法与非法 fixture",
                             "numbered_steps":  "1. 生成 OpenAPI 3.1；2. 比较 snapshot；3. 对每个 operation 注入合法/非法请求；4. 校验错误信封和 correlation ID",
                             "expected_response_ui":  "Schema/运行/客户端一致；非法响应使用冻结 HTTP/code/message_key/details 白名单",
                             "expected_db_files":  "只读场景 DB 无变化；写场景失败按各 operation 事务回滚",
                             "forbidden_side_effects":  "不出现未声明字段/枚举、供应商原文、堆栈、路径或缺失 correlation ID",
                             "evidence_files":  "openapi.json、snapshot-diff.json、response.json、redaction.json"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-unknown-retryable",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-09、16、17.18、AC-04、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "独立 unknown_retryable fixture；已提交任务",
                             "numbered_steps":  "1. 触发未知临时错误；2. 检查唯一下一步为“稍后重试”；3. 在受控条件恢复后点击；4. 查询任务和脱敏诊断",
                             "expected_response_ui":  "原任务 failed/category=unknown_retryable；只提供“稍后重试”；动作后同项目新增一个 GenerationJob",
                             "expected_db_files":  "原任务 release 一次、无 output；新任务独立 reserve；只保留非敏感诊断",
                             "forbidden_side_effects":  "不显示“使用原输入重试”、修改输入、选模型或联系管理员；不泄漏原始错误或自动重试",
                             "evidence_files":  "response.json、worker-events.json、db-diff.json、screenshots/unknown-retryable.png"
                         },
                         {
                             "case_id":  "TDD-WP0-BND-001-loopback-origin",
                             "parent_family":  "TDD-WP0-BND-001",
                             "requirement_ac_source":  "NFR-09、AC-24",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "API 未启动；回环、局域网、错误 Host/Origin 和预检请求参数",
                             "numbered_steps":  "1. 启动产品包；2. 检查监听地址；3. 从允许/拒绝地址请求；4. 发送跨源/CORS 预检",
                             "expected_response_ui":  "只接受 127.0.0.1:43121 与同源；其他路径连接失败或按门禁拒绝",
                             "expected_db_files":  "无业务表、会话、外部用量变化",
                             "forbidden_side_effects":  "不监听 0.0.0.0/IPv6 wildcard，不建防火墙入站规则，不返回 CORS 放行头",
                             "evidence_files":  "socket-listeners.json、response.json、firewall-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP2-GEN-003-stale-config",
                             "parent_family":  "TDD-WP2-GEN-003",
                             "requirement_ac_source":  "GEN-15、ADMIN-03、AC-30",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "用户已确认旧 model_config_version/cost；管理员原子发布新集合",
                             "numbered_steps":  "1. 旧页面直接提交；2. 读取 412 摘要；3. 重新 GET models 并明确确认；4. 再提交",
                             "expected_response_ui":  "第一次 412 且要求重新确认；第二次才可创建任务",
                             "expected_db_files":  "第一次 job/project/reference/reserve/outbox 全无变化；第二次按新快照创建",
                             "forbidden_side_effects":  "第一次不上游、不持久化参考图、不冻结；不自动替用户切推荐模型",
                             "evidence_files":  "response.json、db-diff.json、external-calls.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-unknown-non-retryable",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-09、16、17.18、AC-04、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "独立 unknown_non_retryable fixture；已提交任务",
                             "numbered_steps":  "1. 触发未知不可重试错误；2. 检查唯一下一步为“联系管理员”；3. 尝试寻找或调用重复提交动作；4. 查询任务",
                             "expected_response_ui":  "原任务 failed/category=unknown_non_retryable；只提供“联系管理员”，无重试或修改入口",
                             "expected_db_files":  "release 一次；无 output；原草稿保留但本 case 不创建新 job",
                             "forbidden_side_effects":  "不自动重试、不循环轮询制造新任务、不降级为 unknown_retryable、不提供其他类别动作",
                             "evidence_files":  "response.json、worker-events.json、db-diff.json、screenshots/unknown-non-retryable.png"
                         },
                         {
                             "case_id":  "TDD-WP2-PROJ-004-conflict-export-once",
                             "parent_family":  "TDD-WP2-PROJ-004",
                             "requirement_ac_source":  "PROJECT-07、EXPORT-05、AC-36 P0-A 子集",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "conflicted 标签页，conflict_export_used=false",
                             "numbered_steps":  "1. 本地导出一次（成功和失败各参数）；2. 再次尝试；3. 刷新最新版本",
                             "expected_response_ui":  "第一次结束后立即禁用再次导出；结果明确“仅下载本页版本，未写入项目”；刷新到后端最新状态",
                             "expected_db_files":  "所有步骤不调用 latest API，projects/project_states/latest_exports 无变化；flag 只在页面内存",
                             "forbidden_side_effects":  "不因第一次失败允许第二次；不覆盖后端、不另存副本、不把 flag 持久化",
                             "evidence_files":  "network-timeline.json、db-diff.json、trace.zip、screenshots/conflict-export.png"
                         },
                         {
                             "case_id":  "TDD-WP1-SLOT-001-stage-limit",
                             "parent_family":  "TDD-WP1-SLOT-001",
                             "requirement_ac_source":  "AUTH-01、NFR-04、AC-32、45",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "参数化 9/10 个 active+suspended 普通账号、deleted、多个 super_admin",
                             "numbered_steps":  "1. 发码前尝试第 10/11 人；2. 在发码后并发占满名额再完成；3. 删除普通账号再注册",
                             "expected_response_ui":  "第 10 人可成功，第 11 人发码/完成均阻断；deleted 释放；super_admin 不占名额",
                             "expected_db_files":  "成功时计数/账号/邀请原子；失败零变化；累计统计保留 deleted",
                             "forbidden_side_effects":  "不把 suspended/deleted/super_admin 计错，不通过并发超 10，不让失败占邀请码",
                             "evidence_files":  "response.json、db-diff.json、concurrency-trace.json"
                         },
                         {
                             "case_id":  "TDD-WP6-SVC-001-hard-quota",
                             "parent_family":  "TDD-WP6-SVC-001",
                             "requirement_ac_source":  "ADMIN-05、08、NFR-08、17.15、AC-47",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "Resend 日 79/80、月 2399/2400；高德 999/1000；provider 异常；已有 session",
                             "numbered_steps":  "1. 并发领取最后额度；2. 尝试下一次；3. 注入 provider 故障；4. 检查登录/注册/DYN004/现有 session",
                             "expected_response_ui":  "最后一份已领取调用可结束，后续不调用；状态 paused_quota/provider；已有 session 继续；手动地点继续",
                             "expected_db_files":  "external_service_usage 事务计数/status/reason 更新；失败不创建验证码假成功",
                             "forbidden_side_effects":  "不发送第 81/超月/第 1001 次，不影响已有 session，不切付费/备用，不建运行时邮件质量状态",
                             "evidence_files":  "response.json、db-diff.json、external-calls.json、concurrency-trace.json"
                         },
                         {
                             "case_id":  "TDD-WP2-GEN-002-success",
                             "parent_family":  "TDD-WP2-GEN-002",
                             "requirement_ac_source":  "GEN-06、08、11、CREDIT-03、AC-03",
                             "fixture_ids":  [
                                                 "FX-GATEWAY-SYNC"
                                             ],
                             "fixture_and_preconditions":  "上一 case 的 queued job + FX-GATEWAY-SYNC",
                             "numbered_steps":  "1. Worker 领取；2. 调上游并验证单图；3. 落盘；4. 查询任务/项目",
                             "expected_response_ui":  "queued→running→succeeded；项目可进入编辑且历史新增一图",
                             "expected_db_files":  "lease/heartbeat、output managed file、output_asset、generation_commit、project history/draft_state 一次提交；容量增加实测字节",
                             "forbidden_side_effects":  "不在文件安全落盘前 succeeded；不保存多图；不重复扣点；不改变项目比例",
                             "evidence_files":  "worker-events.json、db-diff.json、fs-after.json、screenshots/succeeded.png"
                         },
                         {
                             "case_id":  "TDD-WP2-EXP-001-result-matrix",
                             "parent_family":  "TDD-WP2-EXP-001",
                             "requirement_ac_source":  "EXPORT-05、06、AC-35、55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "参数化：合成失败、下载失败、project 保存失败、latest 持久化失败、storage full/unavailable",
                             "numbered_steps":  "1. 在 UIDesign 四结果组合及存储状态下导出；2. 记录下载/上传调用顺序；3. 重读项目/latest",
                             "expected_response_ui":  "分别显示冻结结果文案；可合成时允许规定本地下载；下载失败可复用同一次合成；后端失败明确 latest 未更新",
                             "expected_db_files":  "失败分支保留旧 latest；project 保存失败不写新 state；latest 失败不写 latest/managed file；成功分支才更新",
                             "forbidden_side_effects":  "不撤回已下载文件；不以本地下载覆盖后端记录；不显示双成功假状态；不把 Blob 存浏览器持久缓存",
                             "evidence_files":  "每参数 network-timeline.json、response.json、db-diff.json、trace.zip、screenshots/result.png"
                         },
                         {
                             "case_id":  "TDD-WP0-STO-003-unavailable-matrix",
                             "parent_family":  "TDD-WP0-STO-003",
                             "requirement_ac_source":  "17.19、NFR-05、AC-35、55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "LocalDataRoot 不可写，再参数化 SQLite 仍可写/不可写",
                             "numbered_steps":  "1. 尝试 project JSON 保存、生成和二进制写；2. 读取/下载/仅下载；3. 尝试删除/清理",
                             "expected_response_ui":  "新增后端写全部失败且 UI 为 failed/unavailable；读取、下载和可行的仅下载保留；SQLite 不可写时删除/排队明确未提交",
                             "expected_db_files":  "不更新 state_version/managed bytes/latest/job/ledger；SQLite 可写时允许规定逻辑删除/队列，反之无 DB 变化",
                             "forbidden_side_effects":  "不显示已保存；不上游；不把内存草稿写浏览器持久存储；不伪造清理完成",
                             "evidence_files":  "response.json、db-diff.json、trace.zip、screenshots/unavailable.png"
                         },
                         {
                             "case_id":  "TDD-WP7-EXT-001-three-real-models",
                             "parent_family":  "TDD-WP7-EXT-001",
                             "requirement_ac_source":  "GEN-13、AC-40、41",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "三模型各自真实凭据/配置，显式执行确认",
                             "numbered_steps":  "1. 显示模型/次数/额度；2. 分别执行纯文字、参考图、四比例、sync/async/查询/响应/错误；3. 脱敏；4. 绑定 config_version",
                             "expected_response_ui":  "三模型独立完整矩阵通过才解除；任一缺项保持 externally_blocked",
                             "expected_db_files":  "只写对应模型验证证据/runtime 状态和允许审计；测试任务/点数按隔离规则",
                             "forbidden_side_effects":  "不共享证据、不自动充值、不保留真实输入/图片/原始响应、不在普通 CI 调用",
                             "evidence_files":  "每模型 contract-matrix.json、external-calls.json、redaction.json、manual-review.json"
                         },
                         {
                             "case_id":  "TDD-WP7-SEC-001-artifact-leak-scan",
                             "parent_family":  "TDD-WP7-SEC-001",
                             "requirement_ac_source":  "PRIV-01、02、NFR-09、AC-41、48、56",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "ZIP、源码、Git、DB 配置、manifest、日志、截图、trace/evidence 全集合；秘密 trap",
                             "numbered_steps":  "1. 解包并扫描文本/二进制/元数据；2. 检查 Windows 用户名/绝对路径；3. 检查缓存/凭据位置；4. 人工复核命中",
                             "expected_response_ui":  "真实敏感值和硬编码用户路径零命中；凭据仅 Credential Manager；诊断通过同一扫描",
                             "expected_db_files":  "只生成扫描报告；不修改被扫描制品",
                             "forbidden_side_effects":  "不把 allowlist/HMAC/验证码/session/提示词/图片/原始错误写证据，不用删除报告掩盖命中",
                             "evidence_files":  "scan-report.json、allowlist.json、manual-review.json"
                         },
                         {
                             "case_id":  "TDD-WP1-CFG-001-secure-revision",
                             "parent_family":  "TDD-WP1-CFG-001",
                             "requirement_ac_source":  "AUTH-07、ADMIN-09、AC-49、50",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "current applied revision N；参数化完整 N+1、HMAC/凭据缺失、身份冲突",
                             "numbered_steps":  "1. 离线写候选安全配置；2. API 启动应用；3. 查询 apply state/session；4. 注入失败重试",
                             "expected_response_ui":  "完整配置原子生效并推进 revision；失败保持 N 并阻止受影响入口",
                             "expected_db_files":  "成功同事务更新 apply state、撤销受影响 session、写 system/backend_secure_config 审计；失败全回滚",
                             "forbidden_side_effects":  "不写白名单/HMAC/pepper/人员身份/凭据，不出现半生效配置",
                             "evidence_files":  "config-result.json、db-diff.json、redaction.json"
                         },
                         {
                             "case_id":  "TDD-WP0-BRW-001-real-supported",
                             "parent_family":  "TDD-WP0-BRW-001",
                             "requirement_ac_source":  "NFR-01、AC-24、41",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "最终 RELEASE.json；真实 Chrome/Edge 独立 profile",
                             "numbered_steps":  "1. 分别启动记录的 full version；2. 完成 UA-CH support check；3. 进入 bootstrap/login；4. 复查产品 API",
                             "expected_response_ui":  "两浏览器均通过并建立短期支持 cookie，产品 API 每次复核品牌/major",
                             "expected_db_files":  "仅门禁所需非敏感记录/cookie；不建用户 session",
                             "forbidden_side_effects":  "不用 Playwright Chromium、伪 UA 或前一 major 代替；不联网查询当前版本",
                             "evidence_files":  "每浏览器 environment.json、response.json、trace.zip、screenshots/supported.png"
                         },
                         {
                             "case_id":  "TDD-WP3-ADP-001-per-model-contract",
                             "parent_family":  "TDD-WP3-ADP-001",
                             "requirement_ac_source":  "GEN-01、02、05、06、13、16、AC-40",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "三个模型各自独立 mock/真实受控账号和脱敏 fixture",
                             "numbered_steps":  "1. 每模型分别执行纯文字、合法参考图、四比例；2. 覆盖同步/异步与查询；3. 验证 MIME/尺寸/单图；4. 注入九类映射",
                             "expected_response_ui":  "每模型只按自身已证实协议成功；结果恰一图；错误映射到固定 category",
                             "expected_db_files":  "真实验证只写对应 model/config_version 的 evidence 状态；任务/点数按独立用例结算",
                             "forbidden_side_effects":  "不从一个模型推断另两个、不共享 verified 标记、不接受多图/未知字段、不记录原始响应",
                             "evidence_files":  "每模型 contract-matrix.json、response.json、external-calls.json、redaction.json"
                         },
                         {
                             "case_id":  "TDD-WP6-ADM-001-role-and-summary",
                             "parent_family":  "TDD-WP6-ADM-001",
                             "requirement_ac_source":  "ADMIN-01、02、04、08、AC-25、49",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "active/suspended super_admin、普通/预览账号，后台安全摘要 fixture",
                             "numbered_steps":  "1. 各主体请求后台页/API；2. 停用 admin 后复用旧页面；3. 浏览列表/详情；4. 检查私有默认",
                             "expected_response_ui":  "仅 active super_admin 可进入；停用立即退出；默认只见脱敏元数据，普通/预览无后台入口",
                             "expected_db_files":  "读取无业务变化；拒绝分支无审计/私有读取；规定登录审计独立存在",
                             "forbidden_side_effects":  "不共享普通/后台 session，不因预览 grant 获后台，不默认返回提示词/图片/密钥",
                             "evidence_files":  "每主体 response.json、db-access.json、trace.zip、screenshots/admin-denied.png"
                         },
                         {
                             "case_id":  "TDD-WP1-ADM-001-admin-auth-boundary",
                             "parent_family":  "TDD-WP1-ADM-001",
                             "requirement_ac_source":  "AUTH-07、AC-49",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "白名单/非白名单邮箱、已存在普通账号冲突、两个 admin、全部停用状态",
                             "numbered_steps":  "1. 后台发码；2. 首次验证/后续登录；3. 尝试普通 session 访问后台；4. 停用全部并尝试自助恢复",
                             "expected_response_ui":  "非白名单发码前拒绝；白名单首次建 super_admin；audience 严格分离；无最后管理员保护且无自助恢复",
                             "expected_db_files":  "允许分支建 admin/session/审计；拒绝分支不建 challenge/session；停用撤销 session",
                             "forbidden_side_effects":  "不泄漏白名单、不使用邀请码/普通名额、不原地提升普通账号、不创建部署人员角色",
                             "evidence_files":  "每参数 response.json、db-diff.json、external-calls.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP4-CAN-001-fifty-elements",
                             "parent_family":  "TDD-WP4-CAN-001",
                             "requirement_ac_source":  "EDITOR-04 至 09、17.5、AC-27",
                             "fixture_ids":  [
                                                 "FX-CANVAS-50"
                                             ],
                             "fixture_and_preconditions":  "FX-CANVAS-50，稳定选择重叠 fixture",
                             "numbered_steps":  "1. 添加到 50；2. 循环选择/长按候选/框选/多选移动；3. 层级/复制/删除；4. 保存/导出；5. 添加第 51",
                             "expected_response_ui":  "前 50 可编辑保存导出；选择顺序确定；第 51 明确阻断且布局不跳",
                             "expected_db_files":  "Canvas 最多 50，成功操作各一次撤销/保存；第 51 无 state change",
                             "forbidden_side_effects":  "不出现图层面板/隐藏/锁定/编组，不因阻断损坏已有元素",
                             "evidence_files":  "canvas-state.json、db-diff.json、trace.zip、performance.json"
                         },
                         {
                             "case_id":  "TDD-WP3-MDL-003-runtime-recommendation",
                             "parent_family":  "TDD-WP3-MDL-003",
                             "requirement_ac_source":  "GEN-15、ADMIN-03、17.2、AC-30、51",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "三模型 verified/available，配置快照和哈希已记录",
                             "numbered_steps":  "1. 依次模拟默认模型不可用、全部不可用、一个原因恢复但另一原因仍在、全部恢复；2. 每步 GET models",
                             "expected_response_ui":  "configured default 始终原 ID；recommended 按可用模型 priority 派生或 null；reason 使用固定优先级",
                             "expected_db_files":  "只更新 model_runtime_availability/GatewayBalanceState/runtime version；config set/version/hash 不变",
                             "forbidden_side_effects":  "不写 enabled/is_default/priority；不自动恢复；不把推荐变成第二默认或用户隐式选择",
                             "evidence_files":  "每步 response.json、db-diff.json、screenshots/model-states.png"
                         },
                         {
                             "case_id":  "TDD-WP4-STK-001-transform-sticker",
                             "parent_family":  "TDD-WP4-STK-001",
                             "requirement_ac_source":  "EDITOR-04 至 09、PROJECT-04、AC-13、27",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "普通贴纸元素和重叠选择 fixture",
                             "numbered_steps":  "1. 移动/缩放/旋转/翻转/透明度；2. 复制/层级/多选；3. 撤销重做；4. 保存/导出重开",
                             "expected_response_ui":  "画布、属性控件、导出和重开状态一致；每次连续手势是一项撤销",
                             "expected_db_files":  "Canvas element snapshot/state_version 按提交更新",
                             "forbidden_side_effects":  "不改变 stable ID/resource_version，不引入隐藏/锁定/编组，不丢选择",
                             "evidence_files":  "canvas-state.json、db-diff.json、pixel-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP3-MDL-002-contract-change",
                             "parent_family":  "TDD-WP3-MDL-002",
                             "requirement_ac_source":  "GEN-13、15、ADMIN-03、AC-30、40",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "verified 模型集合",
                             "numbered_steps":  "1. 修改端点/字段/参考图/响应/异步查询/error mapping 任一契约字段；2. 保存；3. GET models；4. 尝试生成",
                             "expected_response_ui":  "保存成功但对应模型 contract unverified、runtime reason contract_unverified；生成被阻断直到独立重验",
                             "expected_db_files":  "新 config_version/set；对应 runtime 独立置 false；审计/outbox 同事务",
                             "forbidden_side_effects":  "不沿用旧 verified 证据；不暗改 enabled/default/priority；不调用真实上游",
                             "evidence_files":  "每参数 response.json、db-diff.json、external-calls.json"
                         },
                         {
                             "case_id":  "TDD-WP0-BRW-002-hard-block",
                             "parent_family":  "TDD-WP0-BRW-002",
                             "requirement_ac_source":  "NFR-01、AC-24",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "参数化其他品牌、错误 major、非 Windows、UA-CH 缺失/冲突/解析失败和原始 API 客户端",
                             "numbered_steps":  "1. 请求 support check；2. 请求 HTML/bundle/API；3. 尝试登录/项目/后台深链；4. 查 DB/外部调用",
                             "expected_response_ui":  "全部 426 BROWSER_UNSUPPORTED，reason 仅四类，页面只有重新打开说明且无绕过",
                             "expected_db_files":  "业务 DB 读取/写入计数为 0，session/验证码/资源读取均无变化",
                             "forbidden_side_effects":  "不返回继续令牌/参数，不发 Resend/AI/高德，不泄露产品数据",
                             "evidence_files":  "每参数 response.json、db-access.json、external-calls.json、screenshots/blocked.png"
                         },
                         {
                             "case_id":  "TDD-WP5-MAN-001-readonly-compiler",
                             "parent_family":  "TDD-WP5-MAN-001",
                             "requirement_ac_source":  "TEXT-01 至 TEXT-14、COL-01 至 COL-05、DYN-01 至 DYN-09、STATIC-01 至 STATIC-04、AC-32、42",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "只读规范入口与独立输出目录；Lua/Prefab/证据目录 trap",
                             "numbered_steps":  "1. 记录源 hash/mtime；2. 运行声明式转换；3. 注入尝试执行 Lua/Prefab/读取证据目录；4. 复核输出",
                             "expected_response_ui":  "只消费允许 catalog/metadata/资源；非法入口失败；输出 manifest 可重现",
                             "expected_db_files":  "只写版本化派生输出；源 hash/mtime 零变化",
                             "forbidden_side_effects":  "不执行 Android runtime、不扫描证据目录、不复制约 3.57 GB 全库、不覆盖源",
                             "evidence_files":  "compiler-report.json、source-before.json、source-after.json、output-manifest.json"
                         },
                         {
                             "case_id":  "TDD-WP1-AUD-001-immutable-triggers",
                             "parent_family":  "TDD-WP1-AUD-001",
                             "requirement_ac_source":  "ADMIN-05、09、17.10、17.16、AC-50",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "各一条 AdminOperationLog/PrivateContentAccessLog；普通、retention、privacy purge 连接",
                             "numbered_steps":  "1. 普通连接 UPDATE/DELETE；2. 伪造 purge 函数；3. 合法作用域在到期/注销执行",
                             "expected_response_ui":  "普通和伪造操作被 trigger 阻断；仅注册作用域执行规定清理",
                             "expected_db_files":  "非法尝试零变化；合法作用域只删除/匿名化允许行并留非敏感结果",
                             "forbidden_side_effects":  "不允许后台/API 任意修改，不混用两类日志，不把正文写审计",
                             "evidence_files":  "sql-results.json、db-diff.json、trigger-definition.json"
                         },
                         {
                             "case_id":  "TDD-WP6-STATE-001-three-model-states",
                             "parent_family":  "TDD-WP6-STATE-001",
                             "requirement_ac_source":  "GEN-15、ADMIN-03、08、AC-30、51",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "default 不可用、其他推荐、全不可用、恢复参数",
                             "numbered_steps":  "1. 打开总览/模型页；2. 注入 runtime 变化；3. SSE 后 REST refetch；4. 恢复一个原因",
                             "expected_response_ui":  "configured default、逐模型 runtime、recommended 三列独立；推荐可 null；UI 不暗换用户选择",
                             "expected_db_files":  "只改 runtime/version；ModelConfig/current set 无变化",
                             "forbidden_side_effects":  "不合并三种状态、不把 SSE 当真相、不回写默认/enabled/priority",
                             "evidence_files":  "response.json、db-diff.json、screenshots/model-columns.png、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP4-DYN-002-location-consent",
                             "parent_family":  "TDD-WP4-DYN-002",
                             "requirement_ac_source":  "DYN-04、PRIV-03、AC-17、47",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "DYN004 固定坐标/高德 mock；同意、拒绝、服务暂停参数",
                             "numbered_steps":  "1. 插入前检查 Dada 提示；2. 拒绝；3. 同意并定位/逆地理；4. 手动地点回退；5. 删除元素/注销",
                             "expected_response_ui":  "拒绝调用 0 且不插入坐标；同意后正确显示；暂停时自动定位禁用但手动地点可用",
                             "expected_db_files":  "只在同意后把坐标/文本存实例；删除/注销按规则清理",
                             "forbidden_side_effects":  "前端不持高德密钥，不把坐标用于其他元素/用户，不在提示前调用",
                             "evidence_files":  "external-calls.json、canvas-state.json、db-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP2-GEN-001-submit-snapshot",
                             "parent_family":  "TDD-WP2-GEN-001",
                             "requirement_ac_source":  "GEN-01 至 08、PROJECT-01、AC-03、34、44",
                             "fixture_ids":  [
                                                 "FX-CREDIT-ENOUGH",
                                                 "FX-MODEL-VERIFIED",
                                                 "FX-REF-VALID"
                                             ],
                             "fixture_and_preconditions":  "FX-MODEL-VERIFIED、FX-CREDIT-ENOUGH、FX-REF-VALID，new_project",
                             "numbered_steps":  "1. multipart 提交 prompt/model/ratio/config version/cost/reference；2. 查询任务；3. 检查 staging/正式文件",
                             "expected_response_ui":  "成功响应为 queued，返回同一任务真相；UI 不显示假百分比",
                             "expected_db_files":  "新 project、job、reference snapshot、reserve ledger、outbox 同事务；提交后 reference 从 staging 进入私有 managed file",
                             "forbidden_side_effects":  "不接受未冻结高级字段；不让 Worker 领取未完整提交任务；不暴露路径；失败补偿不留下可读半文件",
                             "evidence_files":  "request.json、response.json、db-diff.json、fs-before.json、fs-after.json"
                         },
                         {
                             "case_id":  "TDD-WP1-AUTH-004-challenge-guards",
                             "parent_family":  "TDD-WP1-AUTH-004",
                             "requirement_ac_source":  "AUTH-02、04、AC-33",
                             "fixture_ids":  [
                                                 "FX-CHALLENGE"
                                             ],
                             "fixture_and_preconditions":  "FX-CHALLENGE、可控时钟、active 普通账号",
                             "numbered_steps":  "1. 成功消费验证码；2. 重放同码；3. 新建 challenge 后前进超过 10 分钟再提交；4. 发码后 60 秒内再发；5. 连续错误触发限流",
                             "expected_response_ui":  "仅首次有效提交成功；重放/过期/错误使用稳定错误；60 秒重发和高频为 429；页面不显示假成功",
                             "expected_db_files":  "首次 challenge consumed_at 只写一次；失败次数/限流记录按规则变化；失败分支不新增 session",
                             "forbidden_side_effects":  "不记录验证码明文；不延长原 challenge；限流失败不调用 Resend、不创建会话",
                             "evidence_files":  "每参数 response.json、db-diff.json、external-calls.json"
                         },
                         {
                             "case_id":  "TDD-WP2-GEN-001-concurrent-reserve",
                             "parent_family":  "TDD-WP2-GEN-001",
                             "requirement_ac_source":  "CREDIT-03、GEN-07、AC-05、29",
                             "fixture_ids":  [
                                                 "FX-CREDIT-ENOUGH"
                                             ],
                             "fixture_and_preconditions":  "FX-CREDIT-ENOUGH，两个不同 submission/idempotency key 同时开始",
                             "numbered_steps":  "1. 用 barrier 并发提交两次；2. 等待响应；3. 查询 current job、余额和流水",
                             "expected_response_ui":  "一个响应创建任务，另一个 200 返回同一现有任务引用；UI 提供返回当前任务",
                             "expected_db_files":  "仅一个 queued/running job、一个 project（new_project 模式）、一条 reserve ledger；余额只转移一次",
                             "forbidden_side_effects":  "不创建第二项目/参考关系/outbox/upstream call；available 不为负",
                             "evidence_files":  "两份 response.json、db-diff.json、concurrency-trace.json"
                         },
                         {
                             "case_id":  "TDD-WP3-MDL-002-invalid-set",
                             "parent_family":  "TDD-WP3-MDL-002",
                             "requirement_ac_source":  "ADMIN-03、17.2、AC-30",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "参数化缺替代、非法替代、priority 缺失/浮点/0/负数/重复、缺模型/未知模型",
                             "numbered_steps":  "1. 分别 PUT 完整候选；2. 读取稳定错误；3. GET 当前集合",
                             "expected_response_ui":  "返回对应 400/409 稳定 code；UI 聚焦修正字段；当前集合仍为 N",
                             "expected_db_files":  "current pointer、versions/runtime/审计成功记录/outbox 均无变化",
                             "forbidden_side_effects":  "不生成孤儿候选 set；不部分改变 enabled/default/priority；不新增错误分类",
                             "evidence_files":  "每参数 response.json、db-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP2-EXP-001-same-blob-success",
                             "parent_family":  "TDD-WP2-EXP-001",
                             "requirement_ac_source":  "EXPORT-04、AC-23、35",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "saved project，已有旧 JPG latest；新客户端 Blob B",
                             "numbered_steps":  "1. 记录 B SHA-256；2. 用 B 触发浏览器下载；3. 同一 B 调 EXPORT_SAVE；4. 重读 latest 并下载",
                             "expected_response_ui":  "UI 显示“已下载并保存为最新成品”；两个通道 hash 相同",
                             "expected_db_files":  "原子替换该格式 latest_exports/managed file；旧 JPG 进入规定清理；PNG latest 不变；容量按真实文件更新",
                             "forbidden_side_effects":  "不重新编码第二份 Blob；不保留完整导出历史；不影响另一格式；幂等重试不重复计量",
                             "evidence_files":  "download.json、request.json、response.json、db-diff.json、fs-before.json、fs-after.json"
                         },
                         {
                             "case_id":  "TDD-WP7-EXT-002-real-resend",
                             "parent_family":  "TDD-WP7-EXT-002",
                             "requirement_ac_source":  "AUTH-01、02、07、AC-01、33、41、47、49",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "已验证发信域名、正式受控普通/admin 邮箱、免费规则记录",
                             "numbered_steps":  "1. 核 SPF/DKIM/免费规则；2. QQ/163/至少一种企业邮箱各发 20 封；3. 统计 2 分钟送达；4. 真实完成普通/admin 认证",
                             "expected_response_ui":  "每类至少 19/20 在 2 分钟内且两类认证成功；否则阻止发布但不改 runtime service_status",
                             "expected_db_files":  "只保存人工汇总/证据 hash；不建逐封 EmailVerificationEvent",
                             "forbidden_side_effects":  "不用预置账号/mock 冒充，不保存验证码/真实邮箱进证据，不切付费备用",
                             "evidence_files":  "delivery-summary.json、domain-check.json、auth-result.json、redaction.json"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-upstream-timeout",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-09、16、17.18、AC-04、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "独立 upstream_timeout fixture；已提交任务超时",
                             "numbered_steps":  "1. 触发超时；2. 检查唯一下一步为“使用原输入重试”；3. 点击该动作；4. 查询原任务、新任务和项目",
                             "expected_response_ui":  "原任务 failed/category=upstream_timeout；只提供“使用原输入重试”；动作后同项目新增一个 GenerationJob",
                             "expected_db_files":  "原任务 release 一次且无 output；新任务独立 reserve 并保存相同输入关系快照",
                             "forbidden_side_effects":  "不改成“稍后重试”；不要求修改输入/选择模型/联系管理员；不复用原任务 ID 或创建第二项目",
                             "evidence_files":  "response.json、worker-events.json、db-diff.json、screenshots/upstream-timeout.png"
                         },
                         {
                             "case_id":  "TDD-WP2-PROJ-005-failed-draft-retry",
                             "parent_family":  "TDD-WP2-PROJ-005",
                             "requirement_ac_source":  "PROJECT-01、GEN-09、AC-04、43",
                             "fixture_ids":  [
                                                 "FX-PROJECT-EMPTY"
                                             ],
                             "fixture_and_preconditions":  "FX-PROJECT-EMPTY 和含成功图项目",
                             "numbered_steps":  "1. 失败页重试两次；2. 返回工作台主动新建；3. 多选批量删除 failed_empty 与成功项目",
                             "expected_response_ui":  "重试只在原 project 新增 job；主动新建才新 project；批量只接受无成功图草稿",
                             "expected_db_files":  "原草稿保留 prompt/config；job 数递增；批量合格项 trashed，成功项目不变",
                             "forbidden_side_effects":  "不把重试变新项目、不把成功项目纳入快捷批量、不丢草稿输入",
                             "evidence_files":  "response.json、db-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP7-EXT-003-real-amap",
                             "parent_family":  "TDD-WP7-EXT-003",
                             "requirement_ac_source":  "DYN-04、PRIV-03、AC-17、41、47",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "个人认证高德 Web 服务 Key、安全绑定和显式确认",
                             "numbered_steps":  "1. 核接口/QPS/白名单/安全/免费规则；2. 执行定位/逆地理；3. 验证 1,000 硬限模拟/受控测试；4. 脱敏坐标证据",
                             "expected_response_ui":  "接口、绑定和应用硬停止通过才解除；失败保持 externally_blocked",
                             "expected_db_files":  "只写非敏感用量/状态/证据；测试坐标不关联真实项目",
                             "forbidden_side_effects":  "不暴露 Key/真实用户坐标，不发第 1001 次，不启用付费或自动扩容",
                             "evidence_files":  "amap-contract.json、external-calls.json、redaction.json、manual-review.json"
                         },
                         {
                             "case_id":  "TDD-WP4-EXP-001-cancel-pending-edit",
                             "parent_family":  "TDD-WP4-EXP-001",
                             "requirement_ac_source":  "EXPORT-03、AC-23",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "与上一 case 相同",
                             "numbered_steps":  "1. 打开弹层；2. 取消未提交修改确认；3. 检查画布/撤销/网络",
                             "expected_response_ui":  "弹层关闭或停留在未导出状态；无下载、无成功提示",
                             "expected_db_files":  "state_version、latest_exports、撤销栈、保存队列均不因取消改变",
                             "forbidden_side_effects":  "不提交当前编辑、不合成、不下载、不调 EXPORT_SAVE",
                             "evidence_files":  "network-timeline.json、db-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP0-DATA-001-root-validation",
                             "parent_family":  "TDD-WP0-DATA-001",
                             "requirement_ac_source":  "NFR-09、17.19、AC-41、55、56",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "参数化 repo/project/download/只读素材根、合规外部目录、已初始化后缺失目录",
                             "numbered_steps":  "1. 用离线配置设置各路径；2. 启动；3. 删除已初始化根后重启；4. 调资源 API",
                             "expected_response_ui":  "违规路径拒绝；合规路径可写；缺失根进入 data_missing 且不自动重建；浏览器只见逻辑资源 ID",
                             "expected_db_files":  "仅合规首次初始化创建固定目录/DB；失败不创建散落目录",
                             "forbidden_side_effects":  "不硬编码用户名、不回显绝对路径、不在源码/下载/素材根写业务数据",
                             "evidence_files":  "config-result.json、fs-before.json、fs-after.json、response.json"
                         },
                         {
                             "case_id":  "TDD-WP3-WRK-001-recovery",
                             "parent_family":  "TDD-WP3-WRK-001",
                             "requirement_ac_source":  "GEN-08、09、CREDIT-03、AC-04、51",
                             "fixture_ids":  [
                                                 "FX-GATEWAY-ASYNC",
                                                 "FX-GATEWAY-UNKNOWN"
                                             ],
                             "fixture_and_preconditions":  "参数化 FX-GATEWAY-ASYNC 有引用和 FX-GATEWAY-UNKNOWN 无安全引用；在 submit 后终止 Worker",
                             "numbered_steps":  "1. 使租约过期；2. 重启 Worker；3. 有引用分支 poll；4. 无引用分支终结；5. 再重启复查",
                             "expected_response_ui":  "有引用不重新 submit，只 poll 到真实终态；无引用为 failed/unknown_retryable，后台显示成本核对待人工",
                             "expected_db_files":  "租约重新领取；无引用 upstream_outcome_known=false、upstream_cost_reconciliation=pending_manual_review，release 一次",
                             "forbidden_side_effects":  "不把 pending_manual_review 写入 job status；不补扣用户点数；不重复上游 submit/结算",
                             "evidence_files":  "worker-events.json、db-diff.json、external-calls.json"
                         },
                         {
                             "case_id":  "TDD-WP0-SEC-001-credential-channel",
                             "parent_family":  "TDD-WP0-SEC-001",
                             "requirement_ac_source":  "PRIV-01、AC-41",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "Windows Credential Manager 测试条目；API/Worker 各需不同凭据；缺失/清除参数",
                             "numbered_steps":  "1. Supervisor 读取；2. 通过对应匿名管道启动子进程；3. 检查命令行/环境/句柄；4. 清除并重启",
                             "expected_response_ui":  "仅目标子进程能在内存读取一次；缺失时服务明确不可用/启动失败",
                             "expected_db_files":  "不写业务 DB；只写非敏感状态与日志",
                             "forbidden_side_effects":  "凭据不进参数、环境、文件、日志、崩溃诊断；API 不获网关密钥，Worker 不获 Resend/高德密钥",
                             "evidence_files":  "process-env-scan.json、pipe-acl.json、redaction.json"
                         },
                         {
                             "case_id":  "TDD-WP5-CAT-001-catalog-1407",
                             "parent_family":  "TDD-WP5-CAT-001",
                             "requirement_ac_source":  "STATIC-01 至 04、AC-13、32",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "规范 catalog/metadata，含 3 组重复图和 part1-25",
                             "numbered_steps":  "1. 编译/加载目录；2. 校验 ID/part/顺序/计数；3. 滚动全目录；4. 观察原图请求/DOM",
                             "expected_response_ui":  "恰 1,407 项，重复图片保留不同稳定 ID；虚拟列表稳定，原图按需加载",
                             "expected_db_files":  "只读 catalog；不复制或改写源；浏览器仅缓存允许公开项",
                             "forbidden_side_effects":  "不去重业务 ID、不一次下载全量、不暴露绝对路径、不线性增长 DOM",
                             "evidence_files":  "catalog-validation.json、network-timeline.json、dom-count.json、source-hashes.json"
                         },
                         {
                             "case_id":  "TDD-WP4-TXT-001-multiline-template-switch",
                             "parent_family":  "TDD-WP4-TXT-001",
                             "requirement_ac_source":  "TEXT-01 至 06、PROJECT-04、AC-09、10",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "多行文字模板实例、固定变换",
                             "numbered_steps":  "1. 输入含换行文字并完成；2. 切换另一模板；3. 撤销/重做；4. 重开/导出",
                             "expected_response_ui":  "换行持久；空内容按规则拒绝；切模板重置默认样式但保留位置/旋转/整体尺寸",
                             "expected_db_files":  "每次完成一条撤销并保存最新 element snapshot",
                             "forbidden_side_effects":  "不把切模板重置变换、不裁切内容、不保存取消编辑",
                             "evidence_files":  "canvas-state.json、db-diff.json、pixel-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP6-SVC-002-limit-recovery",
                             "parent_family":  "TDD-WP6-SVC-002",
                             "requirement_ac_source":  "ADMIN-08、09、NFR-08、AC-47、52",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "paused 服务；参数化下调 hard_limit、提高/付费/自动扩容、新周期/供应商恢复",
                             "numbered_steps":  "1. 尝试各配置；2. 无确认恢复；3. 建立非敏感恢复检查；4. admin 明确确认",
                             "expected_response_ui":  "只允许不扩大能力的下调并审计；提高/付费/自动扩容拒绝；满足条件+确认后恢复",
                             "expected_db_files":  "成功下调/恢复与 AdminOperationLog 同事务；非法请求零变化",
                             "forbidden_side_effects":  "不自动恢复、不保存凭据/供应商原文、不把暂停伪装成功或提高上限",
                             "evidence_files":  "每参数 response.json、db-diff.json、screenshots/service-state.png"
                         },
                         {
                             "case_id":  "TDD-WP0-EVT-001-rest-refetch",
                             "parent_family":  "TDD-WP0-EVT-001",
                             "requirement_ac_source":  "PROJECT-04、GEN-14、NFR-05、DevelopmentPlan 6.2、AC-20、30",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "可控 SSE 序列：正常、断线、event_id 缺号、runtime/config 变化",
                             "numbered_steps":  "1. 订阅 /api/v1/events；2. 注入事件；3. 断线/缺号；4. 观察 REST 请求和 UI",
                             "expected_response_ui":  "事件只提示 ID/type/entity/version/time；每次由 REST 取真相；断线/缺号 bootstrap/refetch",
                             "expected_db_files":  "SSE 不直接写业务表；REST 读取后前端状态更新",
                             "forbidden_side_effects":  "不携带正文/图片/凭据，不把 runtime 事件写 ModelConfig，不抢焦点",
                             "evidence_files":  "sse-events.json、network-timeline.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP6-DIAG-001-redacted-diagnostics",
                             "parent_family":  "TDD-WP6-DIAG-001",
                             "requirement_ac_source":  "PRIV-01、02、ADMIN-08、NFR-09、AC-41、55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "总览/服务/存储/诊断包含所有状态；注入密钥、邮箱、路径、正文 trap",
                             "numbered_steps":  "1. 请求各摘要；2. 复制诊断；3. 检查托盘诊断；4. 跑脱敏扫描",
                             "expected_response_ui":  "仅显示固定非敏感字段、逻辑位置、计量和状态；复制内容一致",
                             "expected_db_files":  "只读；可记录非敏感诊断访问/时间，不改变服务状态",
                             "forbidden_side_effects":  "不含密钥/HMAC/邮箱/提示词/图片/绝对路径/供应商正文，不提供隐藏修复写入口",
                             "evidence_files":  "response.json、diagnostic.txt、redaction.json、screenshots/diagnostics.png"
                         },
                         {
                             "case_id":  "TDD-WP2-PROJ-001-new-versus-continue",
                             "parent_family":  "TDD-WP2-PROJ-001",
                             "requirement_ac_source":  "PROJECT-01 至 03、GEN-04、11、AC-03、06、34",
                             "fixture_ids":  [
                                                 "FX-PROJECT-ACTIVE-19"
                                             ],
                             "fixture_and_preconditions":  "FX-PROJECT-ACTIVE-19、一个 9 图固定比例项目",
                             "numbered_steps":  "1. 工作台新建两次；2. 在第一个项目继续生成；3. 尝试改比例；4. 补到 10 图再继续",
                             "expected_response_ui":  "两次新建为两个 project；继续只新增 job/history且沿用比例；10 图阻断追加但可另建",
                             "expected_db_files":  "projects +2；继续分支 project 数不变；成功 history 正确关联",
                             "forbidden_side_effects":  "不默认追加最近项目、不创建第三项目、不改变既有项目比例、不让历史上限阻断其他新建",
                             "evidence_files":  "response.json、db-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-gateway-contract",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-13、16、17.18、AC-40、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "gateway_contract_invalid 创建前/后 fixture；另一个 contract verified 模型",
                             "numbered_steps":  "1. 触发契约未验证/失效；2. 检查下一步仅“选择其他模型或联系管理员”；3. 显式改选已验证模型并重新确认；4. 无候选时检查联系管理员",
                             "expected_response_ui":  "返回/保存 category=gateway_contract_invalid；已提交任务 failed；改选 verified 模型后才能新提交",
                             "expected_db_files":  "创建前无 reserve/job；创建后 release 一次；失效模型 contract 状态按契约更新；新任务保存新模型/版本",
                             "forbidden_side_effects":  "不提供等待、原输入/稍后重试；不让未验证模型提交；不自动切推荐或部分改写配置",
                             "evidence_files":  "response.json、db-diff.json、external-calls.json、screenshots/gateway-contract.png"
                         },
                         {
                             "case_id":  "TDD-WP3-ADP-002-invalidate-revalidate",
                             "parent_family":  "TDD-WP3-ADP-002",
                             "requirement_ac_source":  "GEN-13、15、ADMIN-03、AC-30、40",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "三模型 verified；参数化端点/字段/参考图/响应/异步/查询/error protocol 变化",
                             "numbered_steps":  "1. 改一个契约字段并保存；2. 尝试生成；3. 仅为该模型重跑完整矩阵；4. 再尝试",
                             "expected_response_ui":  "变化后立即 unverified/不可新建；完整独立重验后才恢复 verified",
                             "expected_db_files":  "新 config_version；对应 runtime/evidence 版本更新；其他模型证据不变",
                             "forbidden_side_effects":  "不沿用旧证据、不局部 smoke 即 verified、不暗改 enabled/default/priority",
                             "evidence_files":  "每字段 db-diff.json、contract-matrix.json、response.json"
                         },
                         {
                             "case_id":  "TDD-WP5-UPL-001-upload-metering",
                             "parent_family":  "TDD-WP5-UPL-001",
                             "requirement_ac_source":  "ADMIN-06、17.7、17.19、AC-31、55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "PNG/WebP、坏 MIME/解码、稳定 ID 冲突；active/full/unavailable；原图+缩略图字节",
                             "numbered_steps":  "1. multipart 上传并指定 part/order；2. 生成缩略图；3. 注入非法/冲突/容量状态；4. 重计量",
                             "expected_response_ui":  "合法上传成功并可上架；非法/冲突明确失败；full/unavailable 阻断写但已有资源可读",
                             "expected_db_files":  "原图/缩略图分别 reservation/managed_file 并计量；失败零文件/目录项",
                             "forbidden_side_effects":  "不用扩展名替代解码、不漏计缩略、不部分覆盖稳定 ID、不在 full 写入",
                             "evidence_files":  "response.json、db-diff.json、fs-before.json、fs-after.json"
                         },
                         {
                             "case_id":  "TDD-WP4-COL-001-deterministic-palette",
                             "parent_family":  "TDD-WP4-COL-001",
                             "requirement_ac_source":  "COL-01 至 05、AC-15 P0-A 子集、16",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "固定解码底图、mmcq-v1、四个 P0-A 色卡",
                             "numbered_steps":  "1. 重复提取五色；2. 调裁剪/调色/滤镜；3. 换原始底图；4. 渲染四布局；5. 监控网络",
                             "expected_response_ui":  "同图五色/顺序确定；处理不刷新；换底图刷新；四色卡消费同一五色",
                             "expected_db_files":  "五色快照只在底图更换提交时保存；无上传文件",
                             "forbidden_side_effects":  "不读取处理后像素/额外图片，不联网提色，不启用白名单外色卡",
                             "evidence_files":  "palette.json、network-timeline.json、pixel-diff.json、db-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP6-PRIV-002-open-after-audit",
                             "parent_family":  "TDD-WP6-PRIV-002",
                             "requirement_ac_source":  "ADMIN-05、17.10、AC-25、50",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "active admin A 已确认 current；目标含图片和完整提示词",
                             "numbered_steps":  "1. 列表确认无正文；2. 不带 purpose/reason 调 PRIVATE_OPEN；3. 在提交钩子确认审计落库后才释放受控读取；4. 对同目标再打开",
                             "expected_response_ui":  "每个入口原样“打开并记录审计”；每次打开成功且各生成一条访问审计",
                             "expected_db_files":  "每次先 append 一条含 admin/目标/时间/content_type/expires_at 的 PrivateContentAccessLog；内容本身不入审计",
                             "forbidden_side_effects":  "UI/API 不要求目的、原因或二次确认；不预取/hover 打开；不把正文放列表、HTML、缓存或证据",
                             "evidence_files":  "response.json、db-diff.json、ordering-trace.json、trace.zip、screenshots/open-entry.png"
                         },
                         {
                             "case_id":  "TDD-WP6-PRIV-002-deny-without-audit",
                             "parent_family":  "TDD-WP6-PRIV-002",
                             "requirement_ac_source":  "ADMIN-05、17.10、AC-25",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "参数化未确认、普通用户/预览账号、停用 admin、审计 insert 失败",
                             "numbered_steps":  "1. 调区域/PRIVATE_OPEN；2. 模拟审计约束失败；3. 枚举页面、SW、Cache、IndexedDB",
                             "expected_response_ui":  "未确认 428；其他未授权 401/403/404 按冻结协议；审计失败返回非成功且无内容字节",
                             "expected_db_files":  "未授权无访问审计；审计失败事务不留下伪成功记录，也不发放读取",
                             "forbidden_side_effects":  "不返回正文/图片/可推导 URL；不写 AdminOperationLog 替代；不因 notice ack 省略逐次审计",
                             "evidence_files":  "每参数 response.json、db-diff.json、cache-enumeration.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP1-DEL-001-account-delete",
                             "parent_family":  "TDD-WP1-DEL-001",
                             "requirement_ac_source":  "AUTH-06、AC-22、39、56",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "用户拥有项目、参考/生成/导出、坐标、点数、多个 session",
                             "numbered_steps":  "1. 确认注销；2. 并发调用受保护 API；3. 尝试旧资源 ID/恢复；4. 用新邀请重新注册同邮箱",
                             "expected_response_ui":  "注销成功后所有旧访问立即 401/404；不可恢复；新注册是全新账号",
                             "expected_db_files":  "同事务撤销 sessions、删除身份/业务关系/未用点数并创建允许匿名事件；物理文件排队",
                             "forbidden_side_effects":  "不延迟撤权到物理清理，不恢复旧 ID/点数/资料，不保留邮箱映射到匿名主体",
                             "evidence_files":  "response.json、db-diff.json、worker-events.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP4-DYN-001-fixed-time",
                             "parent_family":  "TDD-WP4-DYN-001",
                             "requirement_ac_source":  "DYN-01 至 03、AC-14",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "可控时钟、DYN001-003/007/008/011 fixture",
                             "numbered_steps":  "1. 插入/确认动态值；2. 推进墙钟；3. 重开；4. 导出",
                             "expected_response_ui":  "使用插入/确认时快照，重开/导出不随当前时间变化；结果静态不可点击",
                             "expected_db_files":  "动态实例只保存允许字段和值快照",
                             "forbidden_side_effects":  "不保存定时器/外部链接，不在重开重新计算，不输出 GIF/视频",
                             "evidence_files":  "canvas-state.json、clock-trace.json、pixel-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP2-CRED-001-reserve",
                             "parent_family":  "TDD-WP2-CRED-001",
                             "requirement_ac_source":  "CREDIT-01 至 05、AC-03",
                             "fixture_ids":  [
                                                 "FX-CREDIT-ENOUGH",
                                                 "FX-MODEL-VERIFIED"
                                             ],
                             "fixture_and_preconditions":  "FX-CREDIT-ENOUGH、FX-MODEL-VERIFIED，无活动任务",
                             "numbered_steps":  "1. 记录余额；2. 以成本 1 调 POST /api/v1/generations；3. 查询 /me/credits 和流水",
                             "expected_response_ui":  "创建任务成功；UI 显示 available 9/reserved 1 和 queued；流水显示 generation_reserve",
                             "expected_db_files":  "credit_accounts 原子 10/0→9/1；一条 reserve ledger、一个 queued job 和 outbox 同事务",
                             "forbidden_side_effects":  "不提前生成 commit；不使总点数改变；不出现任务已建但未冻结或冻结无任务",
                             "evidence_files":  "request.json、response.json、db-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP0-DATA-002-no-backup-migration",
                             "parent_family":  "TDD-WP0-DATA-002",
                             "requirement_ac_source":  "AUTH-06、NFR-09、AC-24、56",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "有账号/项目/下载成品的 LocalDataRoot",
                             "numbered_steps":  "1. 搜索 UI/API/包功能；2. 尝试导出项目包/DB/账号/点数；3. 删除根/重装；4. 启动模拟 P0-B 导入",
                             "expected_response_ui":  "仅原图/JPG/PNG 下载可用；固定本机提示持续显示；删除/重装不可恢复；无迁移入口",
                             "expected_db_files":  "下载目录文件保留；业务数据删除后不被重建或导入",
                             "forbidden_side_effects":  "不自动备份、不生成迁移包、不把下载图识别为正式迁移数据",
                             "evidence_files":  "route-inventory.json、package-scan.json、trace.zip、screenshots/fixed-copy.png"
                         },
                         {
                             "case_id":  "TDD-WP4-BG-002-processing-controls",
                             "parent_family":  "TDD-WP4-BG-002",
                             "requirement_ac_source":  "EDITOR-01 至 03、PROJECT-04、EXPORT-03、AC-07、20、23",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "固定底图和像素基线",
                             "numbered_steps":  "1. 参数化填充/适配/裁剪/缩放/定位及亮度、对比度、饱和度、色温、锐度、预设滤镜；2. 完成；3. 撤销；4. 恢复原图；5. 导出/重开",
                             "expected_response_ui":  "每项预览与提交值一致；完成一次撤销；导出/重开一致；恢复原图只清底图处理",
                             "expected_db_files":  "每次提交进入保存的 Canvas JSON；取消无 DB 变化",
                             "forbidden_side_effects":  "不影响覆盖元素，不持久化未提交预览，不用静默超范围值",
                             "evidence_files":  "每参数 canvas-state.json、db-diff.json、pixel-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP5-CACHE-001-no-private-client-state",
                             "parent_family":  "TDD-WP5-CACHE-001",
                             "requirement_ac_source":  "NFR-07、17.14、AC-46、48",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "已访问 public/preview/private、提示词和项目；注册 SW fixture",
                             "numbered_steps":  "1. 完成各访问；2. 离线/刷新；3. 枚举 SW registrations、Cache keys/body、IndexedDB stores/records",
                             "expected_response_ui":  "仅 public allowlist 元数据/资源存在；SW 不拦 preview/private；离线不能恢复私有正文/草稿",
                             "expected_db_files":  "只允许 public_asset_lru 记录；业务 DB 无变化",
                             "forbidden_side_effects":  "不仅凭响应头判断，不缓存 no-store 内容、项目/提示词/session/验证码/未保存编辑",
                             "evidence_files":  "cache-enumeration.json、service-worker.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP2-CRED-002-admin-adjustment",
                             "parent_family":  "TDD-WP2-CRED-002",
                             "requirement_ac_source":  "CREDIT-05、06、ADMIN-01、09、AC-29、50",
                             "fixture_ids":  [
                                                 "FX-ACTOR-ADMIN-A",
                                                 "FX-JOB-ACTIVE"
                                             ],
                             "fixture_and_preconditions":  "FX-JOB-ACTIVE；available 0/reserved 1；FX-ACTOR-ADMIN-A",
                             "numbered_steps":  "1. 管理员填写原因扣减 5；2. 用同 adjustment_id 重试；3. 用户读点数",
                             "expected_response_ui":  "首次成功，重试返回同一结果；用户显示 available -5/reserved 1；无充值入口",
                             "expected_db_files":  "available 0→-5，reserved 保持 1；一条 admin_adjustment ledger 和一条 AdminOperationLog 同事务",
                             "forbidden_side_effects":  "不改活动任务/冻结流水；不重复调点；不允许空原因；不使生成流程自身制造负数",
                             "evidence_files":  "response.json、db-diff.json、screenshots/negative-balance.png"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-model-disabled",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-07、16、17.18、AC-30、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "model_disabled 创建前 fixture；参数化存在/不存在其他 enabled 模型",
                             "numbered_steps":  "1. 触发创建前阻断；2. 检查下一步仅“选择其他模型或等待”；3. 有可用模型时显式改选并确认；4. 无可用模型时保持页面等待",
                             "expected_response_ui":  "返回 category=model_disabled 且不创建任务；改选后才能提交；无模型时保持禁用",
                             "expected_db_files":  "阻断分支无 job/project/reference/reserve/outbox；改选分支按新模型快照创建",
                             "forbidden_side_effects":  "不提供联系管理员、原输入重试或稍后重试；不自动切推荐或把 runtime 状态写回配置",
                             "evidence_files":  "response.json、db-diff.json、external-calls.json、screenshots/model-disabled.png"
                         },
                         {
                             "case_id":  "TDD-WP0-LOG-001-rotation-redaction",
                             "parent_family":  "TDD-WP0-LOG-001",
                             "requirement_ac_source":  "PRIV-01、02、NFR-09、AC-41、56",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "生成超过 10 MiB/10 文件/30 天日志；注入密钥、邮箱、提示词、路径和写失败",
                             "numbered_steps":  "1. 写边界日志；2. 触发轮转/保留清理；3. 复制诊断；4. 使目录不可写并尝试 AI",
                             "expected_response_ui":  "轮转严格为 10 MiB/10 文件/30 天；诊断只含白名单；写失败进入 unavailable 并阻断 AI",
                             "expected_db_files":  "只更新日志文件和非敏感状态；不改业务对象",
                             "forbidden_side_effects":  "不记录敏感正文/绝对路径/供应商原文，不在日志失败时继续 AI",
                             "evidence_files":  "log-manifest.json、redaction.json、response.json、external-calls.json"
                         },
                         {
                             "case_id":  "TDD-WP0-STO-003-full-matrix",
                             "parent_family":  "TDD-WP0-STO-003",
                             "requirement_ac_source":  "17.19、PROJECT-04、EXPORT-06、AC-55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "managed bytes 恰为上限，status full，SQLite 可写",
                             "numbered_steps":  "1. 保存纯 JSON project state；2. 读取/下载已有文件；3. 客户端合成并仅下载；4. 尝试 latest 保存和新生成；5. 永久删除/显式清理",
                             "expected_response_ui":  "JSON 保存、读取、下载、仅下载、删除/清理入口可用；latest/新生成/其他二进制写为 507",
                             "expected_db_files":  "JSON state_version 可增加；禁止项不新增 managed file/job/ledger；删除/清理只先逻辑提交/排队",
                             "forbidden_side_effects":  "不自动删除；客户端下载不更新 latest_exports；排队不提前减少 managed bytes",
                             "evidence_files":  "response.json、db-diff.json、fs-before.json、fs-after.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP5-CLN-001-reference-race",
                             "parent_family":  "TDD-WP5-CLN-001",
                             "requirement_ac_source":  "ADMIN-06、09、17.7、17.19、AC-31、50、55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "查询时整批文件全部无任何发布/项目/待发布引用",
                             "numbered_steps":  "1. 查询候选并由 admin A 创建 intent；2. 参数化确认前新增各类引用/快照过期/admin 变化；3. A 确认；4. 无竞态分支确认并运行 Worker",
                             "expected_response_ui":  "任一新增引用整批 409 conflict+denied 审计；stale 重新查询；无竞态才整批排队/物理删除/重测",
                             "expected_db_files":  "冲突 bytes/状态/queue 不变；成功排队不减量，物理后同事务更新并记录全阶段审计",
                             "forbidden_side_effects":  "不让查询时有引用项入候选、不由 admin B 确认、不部分排队、不自动清理或提前减量",
                             "evidence_files":  "每参数 response.json、db-diff.json、worker-events.json、fs-after.json"
                         },
                         {
                             "case_id":  "TDD-WP0-STO-001-byte-thresholds",
                             "parent_family":  "TDD-WP0-STO-001",
                             "requirement_ac_source":  "17.19、AC-55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "第 5.5 节七个精确字节 fixture，可写目录",
                             "numbered_steps":  "1. 对每个值重计量；2. 读取 storage state/API/UI；3. 重复计算",
                             "expected_response_ui":  "normal/warning/critical/full 边界逐字节正确，重复结果确定",
                             "expected_db_files":  "只更新 measured bytes/notice/status/last_measured_at；无 managed file 变化",
                             "forbidden_side_effects":  "不用浮点比例导致错一字节，不自动删除，不把 warning/critical 当阻断",
                             "evidence_files":  "每值 result.json、db-diff.json、screenshots/capacity-bar.png"
                         },
                         {
                             "case_id":  "TDD-WP2-CRED-001-finalize-once",
                             "parent_family":  "TDD-WP2-CRED-001",
                             "requirement_ac_source":  "CREDIT-03、05、GEN-09、10、AC-03、04、29",
                             "fixture_ids":  [
                                                 "FX-JOB-ACTIVE"
                                             ],
                             "fixture_and_preconditions":  "参数化成功、技术失败和安全拒绝的 FX-JOB-ACTIVE",
                             "numbered_steps":  "1. Worker 提交终态；2. 重复 callback/poll；3. 模拟 Worker 重启再处理",
                             "expected_response_ui":  "成功为 succeeded；技术失败为 failed；安全拒绝为 rejected；用户余额/动作匹配固定类别",
                             "expected_db_files":  "每任务恰一条 commit 或 release；reserved 恰减一次；成功才建 output/history，失败/拒绝 available 恢复",
                             "forbidden_side_effects":  "不双重 commit/release；不在失败建 output；终态不可逆；不保存供应商原文",
                             "evidence_files":  "worker-events.json、db-diff.json、fs-before.json、fs-after.json"
                         },
                         {
                             "case_id":  "TDD-WP1-AUTH-002-invalid-invite",
                             "parent_family":  "TDD-WP1-AUTH-002",
                             "requirement_ac_source":  "AUTH-01、02、AC-02",
                             "fixture_ids":  [
                                                 "FX-INVITE-EXPIRED"
                                             ],
                             "fixture_and_preconditions":  "参数化 FX-INVITE-EXPIRED/DISABLED/EXHAUSTED 和不存在的邀请码",
                             "numbered_steps":  "1. 对每个参数调 REGISTER_SEND；2. 检查 Resend mock 调用；3. 查询认证相关表",
                             "expected_response_ui":  "返回冻结的非成功错误语义并在邀请码字段显示原因，第二阶段不展开",
                             "expected_db_files":  "users/user_profiles/credit_accounts/privacy_consents/email_challenges/sessions 无新增；邀请码计数不变",
                             "forbidden_side_effects":  "Resend 调用为 0；不建号、不赠点、不占名额、不写成功审计或成功提示",
                             "evidence_files":  "每参数 response.json、db-diff.json、external-calls.json、screenshots/error.png"
                         },
                         {
                             "case_id":  "TDD-WP2-PROJ-003-trash-restore-purge",
                             "parent_family":  "TDD-WP2-PROJ-003",
                             "requirement_ac_source":  "PROJECT-03、08、AC-21",
                             "fixture_ids":  [
                                                 "FX-PROJECT-ACTIVE-20"
                                             ],
                             "fixture_and_preconditions":  "active project、FX-PROJECT-ACTIVE-20、可控 720 小时时钟",
                             "numbered_steps":  "1. 移入回收站；2. 满 20 时恢复；3. 释放名额再恢复；4. 主动永久删除；5. 另一项目推进到 purge_at",
                             "expected_response_ui":  "满额恢复阻断且时间不变；释放后可恢复；purge 后立即不可见/不可恢复",
                             "expected_db_files":  "status/deleted_at/purge_at 精确；purged 撤销访问关系并排物理清理",
                             "forbidden_side_effects":  "不提前物理结果、不因恢复重算 purge_at、不让 purged 资源可读",
                             "evidence_files":  "response.json、db-diff.json、worker-events.json"
                         },
                         {
                             "case_id":  "TDD-WP2-PROJ-002-debounce",
                             "parent_family":  "TDD-WP2-PROJ-002",
                             "requirement_ac_source":  "PROJECT-04、06、AC-20",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "saved project version N、可控前端时钟",
                             "numbered_steps":  "1. 1 秒内完成多次已提交编辑；2. 在首个保存请求在途时继续编辑；3. 释放响应并推进时钟；4. 撤销/重做",
                             "expected_response_ui":  "同时最多一请求；第一份后下一请求为合并后的最新完整状态；状态 saving→saved",
                             "expected_db_files":  "每次成功 state_version +1；最终 project_states 为最新已提交 JSON；撤销/重做也正常保存",
                             "forbidden_side_effects":  "不逐操作并发；不保存 Fabric 私有字段；不把未提交编辑或撤销栈写浏览器持久存储",
                             "evidence_files":  "network-timeline.json、response.json、db-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP0-SUP-001-lifecycle",
                             "parent_family":  "TDD-WP0-SUP-001",
                             "requirement_ac_source":  "NFR-09、AC-24、41",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "真实便携包；参数化第二实例、43121 占用、API/Worker 崩溃、正常退出",
                             "numbered_steps":  "1. 双击启动；2. 注入各故障；3. 观察托盘/重启次数；4. 退出并等待 15 秒",
                             "expected_response_ui":  "单实例；端口占用明确失败且不换端口；有限重启/degraded/允许动作符合契约；退出后无残留",
                             "expected_db_files":  "仅规定日志/状态记录；正常退出 flush WAL/队列；不改业务真相",
                             "forbidden_side_effects":  "不无限重启、不杀无关进程、不弹隐藏控制台、不留下 API/Worker/端口",
                             "evidence_files":  "process-tree.json、port.json、supervisor-events.json、screenshots/system-ui.png"
                         },
                         {
                             "case_id":  "TDD-WP6-AUD-001-sensitive-operations",
                             "parent_family":  "TDD-WP6-AUD-001",
                             "requirement_ac_source":  "ADMIN-09、17.16、AC-50",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "每类规定敏感操作 fixture，含贴纸清理各阶段和 system 配置生效",
                             "numbered_steps":  "1. 逐类执行成功/拒绝；2. 查询 AdminOperationLog；3. 查询 PrivateContentAccessLog；4. 尝试改删/越权查看",
                             "expected_response_ui":  "每次操作同事务形成不可变、非敏感 before/after/result；两类审计分离；只有 admin 查看",
                             "expected_db_files":  "AdminOperationLog 条数/actor_type/ref/expires_at 正确；私有打开只写专表",
                             "forbidden_side_effects":  "不漏失败审计、不重复保存私有正文、不记录白名单/密钥/验证码/路径、不允许人工修改删除",
                             "evidence_files":  "operation-matrix.json、db-diff.json、redaction.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP4-VIS-001-browser-diff",
                             "parent_family":  "TDD-WP4-VIS-001",
                             "requirement_ac_source":  "NFR-02、AC-19、23、32",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "最终 RELEASE Chrome/Edge、固定 Canvas/字体/动态值/DPR",
                             "numbered_steps":  "1. 等待资源稳定；2. 两浏览器截图/导出；3. 计算元素边界/显著像素；4. 人工复核已知替代",
                             "expected_response_ui":  "结构、字体、换行、颜色、描边、装饰在第 10.1 阈值内；替代项明确标记",
                             "expected_db_files":  "只生成视觉证据；业务状态使用同一 fixture",
                             "forbidden_side_effects":  "不用低保真 PNG 作像素基准，不用阈值掩盖缺字体/空画布，不冒充全 P0-B",
                             "evidence_files":  "每场景 pixel-diff.json、layout-boxes.json、manual-review.json、截图"
                         },
                         {
                             "case_id":  "TDD-WP7-AC-001-trace-structure",
                             "parent_family":  "TDD-WP7-AC-001",
                             "requirement_ac_source":  "NFR-05、52 当前 AC、109 需求 ID、13 模块、19 契约、9 错误",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "冻结 allowlist、89 family 定义、117 case 定义、页面矩阵和全部 evidence manifest",
                             "numbered_steps":  "1. 运行 pnpm validate:tdd-trace；2. 注入缺 AC/重复主责/P0-B passed/未知需求/孤儿 family/case 缺字段/错误父族解析；3. 恢复后重跑",
                             "expected_response_ui":  "每种破坏均非零且定位；正确状态返回 0：52 AC、109 唯一 ID、89/89 family 有 case、117 case 字段齐全",
                             "expected_db_files":  "只生成 family/trace validation manifest；不改业务 DB",
                             "forbidden_side_effects":  "不信任手写合计、不让 AC-08/26/37/54 计 passed、不允许未知父族、删除末段式解析或空 automation/release_gate",
                             "evidence_files":  "family-manifest.json、trace-validation.json、negative-fixtures.json"
                         },
                         {
                             "case_id":  "TDD-WP1-AUTH-001-valid-register",
                             "parent_family":  "TDD-WP1-AUTH-001",
                             "requirement_ac_source":  "AUTH-01 至 04、AC-01",
                             "fixture_ids":  [
                                                 "FX-CHALLENGE",
                                                 "FX-INVITE-VALID"
                                             ],
                             "fixture_and_preconditions":  "FX-INVITE-VALID、FX-CHALLENGE；占名额普通账号为 9；未注册 .invalid 邮箱",
                             "numbered_steps":  "1. 调 REGISTER_SEND；2. 读取模拟 Resend 验证码；3. 以署名、社交 ID、当前告知 version/同意和同一 registration_id 调 REGISTER_COMPLETE；4. 调普通 session",
                             "expected_response_ui":  "两次均符合成功 Schema；注册后得到普通 audience 的 30 天会话并进入创作，点数显示 available 10/reserved 0",
                             "expected_db_files":  "users/user_profiles/credit_accounts/privacy_consents 各新增正确关系；invite_codes.used_count +1；challenge 只消费一次；新增 session 只存 token 摘要；初始点数流水一次",
                             "forbidden_side_effects":  "不创建 super_admin；不保存验证码明文；不重复赠点或核销邀请码；不产生第二会话/第二注册实体",
                             "evidence_files":  "request.json、response.json、db-diff.json、trace.zip、screenshots/registered.png"
                         },
                         {
                             "case_id":  "TDD-WP5-WHITE-001-p0a-allowlist",
                             "parent_family":  "TDD-WP5-WHITE-001",
                             "requirement_ac_source":  "TEXT-01、TEXT-04、COL-01、DYN-01、DYN-08、STATIC-01、ADMIN-07、NFR-02、NFR-07、AC-32、42、48",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "普通用户无 grant、预览用户有单批 grant、注册全量模板",
                             "numbered_steps":  "1. 分别读取公开/预览 manifest；2. 搜索白名单外 ID；3. 浏览所有面板",
                             "expected_response_ui":  "普通用户仅 32 文字、实际字体+FONT081、4 色卡、10 动态、1,407 贴纸；预览只多授权批次",
                             "expected_db_files":  "只读；授权不改变 role",
                             "forbidden_side_effects":  "不向普通用户暴露白名单外 passed/internal，不提前开放 P0-B，不遗漏白名单；AC-54 为未来 P0-B，不进入本 case 的当前验收或 passed 关联",
                             "evidence_files":  "manifest.json、response.json、trace.zip、screenshots/allowlist.png"
                         },
                         {
                             "case_id":  "TDD-WP4-BG-001-switch-background",
                             "parent_family":  "TDD-WP4-BG-001",
                             "requirement_ac_source":  "GEN-12、EDITOR-01、PROJECT-04、AC-07",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "画布含文字/贴纸/色卡/动态元素和已调底图，项目有第二历史图",
                             "numbered_steps":  "1. 记录覆盖元素；2. 确认换底图；3. 检查参数/色卡；4. 撤销/重做；5. 重开",
                             "expected_response_ui":  "覆盖层位置尺寸保留；底图处理重置；五色重提；一次撤销且重开一致",
                             "expected_db_files":  "完整 Canvas state 自动保存并 state_version 递增",
                             "forbidden_side_effects":  "不删除/缩放覆盖层，不保留旧调色，不产生多次撤销或改项目比例",
                             "evidence_files":  "canvas-before.json、canvas-after.json、db-diff.json、trace.zip、pixel-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP0-PKG-001-portable-zip",
                             "parent_family":  "TDD-WP0-PKG-001",
                             "requirement_ac_source":  "NFR-01、09、AC-24、41、56",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "release build、空白 Windows 用户目录",
                             "numbered_steps":  "1. 生成 win-x64 ZIP/哈希/START-HERE/RELEASE；2. 解压非仓库目录；3. 离线启动；4. 扫描制品和端口",
                             "expected_response_ui":  "包含 Dada.exe、随包 Node/native 依赖并固定 43121；说明与 RELEASE 一致",
                             "expected_db_files":  "仅合规 LocalDataRoot 生成运行数据；制品本身不可变",
                             "forbidden_side_effects":  "不含真实配置/凭据/用户名/LocalDataRoot，不动态换端口，不要求 Docker/安装器",
                             "evidence_files":  "package-manifest.json、sha256.txt、package-scan.json、process-tree.json"
                         },
                         {
                             "case_id":  "TDD-WP4-A11Y-001-keyboard-focus",
                             "parent_family":  "TDD-WP4-A11Y-001",
                             "requirement_ac_source":  "NFR-06、AC-32",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "第 11.1 节全部 page_id，最长文案、弹层和 200% 缩放",
                             "numbered_steps":  "1. 仅键盘走主流程；2. 检查 skip link/focus order/弹层返回；3. 触发 live region；4. 运行 axe；5. 测画布等价控件",
                             "expected_response_ui":  "所有动作可达，焦点不逃逸/不被 SSE 抢走；critical/serious 为 0；状态非仅颜色",
                             "expected_db_files":  "无非用户触发业务写；可访问性扫描只产证据",
                             "forbidden_side_effects":  "不用正 tabindex、不隐藏主动作、不以缩小字体规避 200% 问题",
                             "evidence_files":  "每页 axe.json、focus-trace.json、trace.zip、screenshots/200pct.png"
                         },
                         {
                             "case_id":  "TDD-WP1-NOTICE-001-registration-consent",
                             "parent_family":  "TDD-WP1-NOTICE-001",
                             "requirement_ac_source":  "AUTH-03、PRIV-04、06、AC-01、41、56",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "当前告知 version/effective_at/hash；缺字段、未勾选和完整参数",
                             "numbered_steps":  "1. 展开注册第二阶段；2. 检查全部处理方/用途/本机风险；3. 未同意提交；4. 同意当前 version 注册",
                             "expected_response_ui":  "未同意/版本错误不能注册；完整告知原样可达；成功进入创作",
                             "expected_db_files":  "失败无 user/consent/invite/credit；成功记录 consent version/time 与账号同事务",
                             "forbidden_side_effects":  "不省略 AI/Resend/高德、DYN004、管理员访问、注销、180 天、无备份/迁移；不预勾选",
                             "evidence_files":  "response.json、db-diff.json、screenshots/notice-expanded.png"
                         },
                         {
                             "case_id":  "TDD-WP2-EXP-002-empty-latest",
                             "parent_family":  "TDD-WP2-EXP-002",
                             "requirement_ac_source":  "EXPORT-04、AC-23、38 P0-A 子集",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "从未导出但有成功原图的项目",
                             "numbered_steps":  "1. 打开项目详情/latest 区；2. 请求 JPG/PNG latest；3. 使用允许动作",
                             "expected_response_ui":  "显示“暂无导出成品”，只提供进入编辑并导出和下载原始生成图",
                             "expected_db_files":  "latest_exports 无行且不因读取创建；原图读取只读",
                             "forbidden_side_effects":  "不自动合成/保存默认成品，不伪造跨设备下载，不改变项目",
                             "evidence_files":  "response.json、db-diff.json、trace.zip、screenshots/no-export.png"
                         },
                         {
                             "case_id":  "TDD-WP7-UI-001-page-state-evidence",
                             "parent_family":  "TDD-WP7-UI-001",
                             "requirement_ac_source":  "UIDesign 全页、NFR-02、06、AC-24、25、32、41、55、56",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "第 11.1 节 22 page_id 与适用状态、最终 Chrome/Edge、100%/200%",
                             "numbered_steps":  "1. 逐非 N/A 单元运行 case；2. 截图/键盘/axe；3. 验证全局容量条；4. 对照 Pencil 相关 frame；5. 人工复核",
                             "expected_response_ui":  "所有 UIDesign 页面/状态有实现证据且无重叠；Canvas Index 不实现；无 frame 页面不漏测",
                             "expected_db_files":  "只生成 UI 证据；交互 DB 变化由所属业务 case 证明",
                             "forbidden_side_effects":  "不用 PNG OCR 推文案、不把 frame 当页面全集、不以 N/A 逃避容量条/错误态",
                             "evidence_files":  "每单元 trace.zip、axe.json、screenshots/100pct.png、screenshots/200pct.png、manual-review.json"
                         },
                         {
                             "case_id":  "TDD-WP4-EXP-001-format-ratio",
                             "parent_family":  "TDD-WP4-EXP-001",
                             "requirement_ac_source":  "EXPORT-01 至 03、AC-23",
                             "fixture_ids":  [
                                                 "FX-CANVAS-RATIOS"
                                             ],
                             "fixture_and_preconditions":  "FX-CANVAS-RATIOS，JPG quality 参数化 80/92/100，PNG",
                             "numbered_steps":  "1. 对四比例分别导出 JPG/PNG；2. 解码像素/ICC；3. 与 Canvas fixture 比较",
                             "expected_response_ui":  "尺寸精确为 1080×1440、1080×1080、1440×1080、1080×1920；sRGB、无水印、PNG 无损、JPG 范围/默认正确",
                             "expected_db_files":  "纯客户端合成本身无 DB 变化；后续保存只处理同一 Blob",
                             "forbidden_side_effects":  "不缩放到其他尺寸；PNG 时质量控件不可聚焦；不因导出改变画布/撤销栈",
                             "evidence_files":  "每组合 result.json、image-metadata.json、pixel-diff.json、export-hash.json"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-upstream-failed",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-09、16、17.18、AC-04、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "独立 upstream_failed fixture；已提交任务临时失败",
                             "numbered_steps":  "1. 触发临时失败；2. 检查唯一下一步为“稍后重试”；3. 在受控条件恢复后点击；4. 查询原任务、新任务和项目",
                             "expected_response_ui":  "原任务 failed/category=upstream_failed；只提供“稍后重试”；动作后同项目新增一个 GenerationJob",
                             "expected_db_files":  "原任务 release 一次且无 output；新任务独立 reserve 和关系快照",
                             "forbidden_side_effects":  "不显示“使用原输入重试”或输入/模型修改动作；不自动重试、不创建第二项目",
                             "evidence_files":  "response.json、worker-events.json、db-diff.json、screenshots/upstream-failed.png"
                         },
                         {
                             "case_id":  "TDD-WP0-STO-003-cleanup-remeasure",
                             "parent_family":  "TDD-WP0-STO-003",
                             "requirement_ac_source":  "ADMIN-06、17.19、AC-31、55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "full；查询时全部为无引用、可清理的历史贴纸文件",
                             "numbered_steps":  "1. 查询候选并创建 intent；2. 参数 A 在确认前给其中一项新增 active/trashed 项目、已发布版本或待发布引用，再确认；3. 参数 B 保持全部无引用并确认；4. 读取排队容量；5. Worker 物理删除并重计量",
                             "expected_response_ui":  "A 返回 ASSET_HISTORY_REFERENCE_CONFLICT 且整批不排队；B 整批排队，排队阶段仍 full，物理删除并重计量后才按真实值恢复",
                             "expected_db_files":  "A 只追加 result=denied 审计且 managed bytes 不变；B scheduled 前后 bytes 不变，物理成功后 files/queue/bytes/status/last_measured_at 同事务更新",
                             "forbidden_side_effects":  "不让查询时已有引用文件进入候选；不部分排队冲突批次；不在物理删除前减量；不自动创建 intent",
                             "evidence_files":  "每参数 response.json、db-diff.json、worker-events.json、fs-before.json、fs-after.json"
                         },
                         {
                             "case_id":  "TDD-WP2-BAL-001-balance-impact",
                             "parent_family":  "TDD-WP2-BAL-001",
                             "requirement_ac_source":  "GEN-14、15、17.17、AC-04、51",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "参数化 model/account/unknown 影响；活动任务与空闲模型",
                             "numbered_steps":  "1. 注入余额不足；2. 结算已提交任务；3. GET models/后台；4. 重复事件；5. 未确认恢复前尝试启用",
                             "expected_response_ui":  "影响范围按规则；任务 failed+release 一次；runtime 不可用；恢复前操作阻断",
                             "expected_db_files":  "GatewayBalanceState/affected models/runtime/审计更新；ModelConfig hash 不变",
                             "forbidden_side_effects":  "不自动充值、不用 Dada 点数继续调用、不重复 release、不自动恢复或改默认/priority",
                             "evidence_files":  "response.json、db-diff.json、worker-events.json、external-calls.json"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-safety-rejected",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-10、16、17.18、AC-04、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "供应商明确安全拒绝证据；与 reference fixture 完全分离",
                             "numbered_steps":  "1. 触发安全拒绝；2. 检查唯一下一步为“修改提示词或参考图”；3. 不修改输入尝试继续；4. 修改提示词或参考图后提交",
                             "expected_response_ui":  "原任务 rejected/category=safety_rejected；未修改时不能新提交；修改后同项目新增 GenerationJob",
                             "expected_db_files":  "原任务 release 一次、无 output；修改前无新 job/reserve；修改后新任务保存修正快照",
                             "forbidden_side_effects":  "不提供原样/稍后重试、选择模型或联系管理员；不保存违规输出；不映射为 reference_invalid",
                             "evidence_files":  "response.json、worker-events.json、db-diff.json、screenshots/safety-rejected.png"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-gateway-balance",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-15、16、17.17、17.18、AC-40、51、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "gateway_balance_insufficient 创建前/后 fixture；明确未受影响模型集合",
                             "numbered_steps":  "1. 触发余额不足；2. 检查下一步仅“选择未受影响模型或联系管理员”；3. 显式选择未受影响模型并重新确认；4. 无候选时检查联系管理员",
                             "expected_response_ui":  "返回/保存 category=gateway_balance_insufficient；已提交任务 failed；只有改选未受影响模型后才能新提交",
                             "expected_db_files":  "创建前无 reserve/job；创建后 release 一次；新任务使用改选模型快照；runtime 影响范围按 GEN-15 更新",
                             "forbidden_side_effects":  "不提供等待、原输入/稍后重试或任意“其他模型”；不自动充值、不用 Dada 点数恢复、不回写 ModelConfig",
                             "evidence_files":  "response.json、db-diff.json、external-calls.json、screenshots/gateway-balance.png"
                         },
                         {
                             "case_id":  "TDD-WP3-MDL-002-cas-conflict",
                             "parent_family":  "TDD-WP3-MDL-002",
                             "requirement_ac_source":  "ADMIN-03、AC-30",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "两个 admin 基于 expected N 编辑不同完整集合",
                             "numbered_steps":  "1. A 保存为 N+1；2. B 仍以 N 保存；3. B 刷新",
                             "expected_response_ui":  "A 成功；B 返回 412 MODEL_CONFIG_VERSION_CONFLICT 和最新安全摘要",
                             "expected_db_files":  "仅 A 的 immutable set、pointer、审计/outbox 存在；B 零写入",
                             "forbidden_side_effects":  "B 不覆盖 A、不自动 merge、不复用过期配置继续提交",
                             "evidence_files":  "两份 response.json、db-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP1-DEL-002-anonymous-retention",
                             "parent_family":  "TDD-WP1-DEL-002",
                             "requirement_ac_source":  "AUTH-06、17.10、17.11、AC-22、39",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "注销前有生成/点数事件和私有访问审计；可控 180 天时钟",
                             "numbered_steps":  "1. 注销；2. 检查匿名字段；3. 在到期前尝试管理删除；4. 到期运行 Worker",
                             "expected_response_ui":  "匿名事件只含允许统计；访问审计目标不可反推；到期前不可删，到期后系统清理",
                             "expected_db_files":  "原身份关联移除；随机匿名主体无映射；expires_at 不因注销延长；到期行删除",
                             "forbidden_side_effects":  "不保留邮箱/IP/提示词/图片/项目/job 原 ID，不让管理员手删或延长期限",
                             "evidence_files":  "db-diff.json、retention-events.json、redaction.json"
                         },
                         {
                             "case_id":  "TDD-WP3-MDL-002-replace-default",
                             "parent_family":  "TDD-WP3-MDL-002",
                             "requirement_ac_source":  "ADMIN-03、17.2、AC-30",
                             "fixture_ids":  [
                                                 "FX-MODEL-VERIFIED"
                                             ],
                             "fixture_and_preconditions":  "FX-MODEL-VERIFIED，current set version N",
                             "numbered_steps":  "1. 完整提交三模型集合：停用当前默认并指定另一个 enabled default；2. 带 expected N/Idempotency-Key；3. GET models",
                             "expected_response_ui":  "保存成功，读取始终恰一个 enabled default，config_set_version=N+1",
                             "expected_db_files":  "新 immutable set/必要 config versions、AdminOperationLog/outbox 写入，最后原子切 current pointer",
                             "forbidden_side_effects":  "不出现可见零默认/双默认中间态；不逐行部分保存；不改无关 runtime",
                             "evidence_files":  "request.json、response.json、db-diff.json、transaction-trace.json"
                         },
                         {
                             "case_id":  "TDD-WP1-AUTH-003-entry-state-matrix",
                             "parent_family":  "TDD-WP1-AUTH-003",
                             "requirement_ac_source":  "AUTH-01、02、05、06、AC-33",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "参数化未注册、active 已注册、deleted、suspended 邮箱；注册和登录两个入口",
                             "numbered_steps":  "1. 每种邮箱分别调注册发码与登录发码；2. 对允许分支完成验证码；3. 检查页面不自动切入口",
                             "expected_response_ui":  "行为严格匹配 PRD AUTH-02 状态矩阵；deleted 仅可新邀请注册；suspended 均提示联系管理员",
                             "expected_db_files":  "只允许的分支创建 challenge/session/new user；重复注册不核销邀请码；deleted 新建主体与旧主体无关联",
                             "forbidden_side_effects":  "不静默注册/登录转换；不恢复 deleted 数据；不因 suspended 释放名额；错误不泄漏后台白名单",
                             "evidence_files":  "每参数 response.json、db-diff.json、trace.zip、screenshots/entry-state.png"
                         },
                         {
                             "case_id":  "TDD-WP4-PERF-001-budget",
                             "parent_family":  "TDD-WP4-PERF-001",
                             "requirement_ac_source":  "NFR-03、AC-27、32",
                             "fixture_ids":  [
                                                 "FX-CANVAS-50"
                                             ],
                             "fixture_and_preconditions":  "FX-CANVAS-50、1,407 贴纸目录、四比例导出、最终浏览器",
                             "numbered_steps":  "1. 预热一次；2. 每预算运行五次；3. 记录 p50/p95/max/memory/DOM；4. 注入导出失败",
                             "expected_response_ui":  "第 10.2 节所有预算通过；失败不破坏 project/latest；资源面板节点不线性增长",
                             "expected_db_files":  "只生成性能数据；失败分支 DB/latest 不变",
                             "forbidden_side_effects":  "不提高超时、减少元素/素材或降低尺寸掩盖失败，不用 Chromium 替代真实浏览器",
                             "evidence_files":  "performance.json、memory.json、dom-count.json、environment.json"
                         },
                         {
                             "case_id":  "TDD-WP2-CRED-001-insufficient",
                             "parent_family":  "TDD-WP2-CRED-001",
                             "requirement_ac_source":  "CREDIT-04、AC-28",
                             "fixture_ids":  [
                                                 "FX-CREDIT-INSUFFICIENT"
                                             ],
                             "fixture_and_preconditions":  "FX-CREDIT-INSUFFICIENT，成本 1",
                             "numbered_steps":  "1. UI 检查生成按钮；2. 直接调生成 API 防绕过；3. 查询 DB/网关 mock",
                             "expected_response_ui":  "UI 禁用并显示 available/reserved/required/联系管理员；API 返回冻结错误语义",
                             "expected_db_files":  "余额、ledger、job、project、reference、outbox 均无变化",
                             "forbidden_side_effects":  "上游调用 0；无 storage reservation/staging 文件；不产生负余额",
                             "evidence_files":  "response.json、db-diff.json、external-calls.json、screenshots/insufficient.png"
                         },
                         {
                             "case_id":  "TDD-WP0-STO-002-over-limit",
                             "parent_family":  "TDD-WP0-STO-002",
                             "requirement_ac_source":  "17.19、NFR-05、AC-55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "已计量+活动预留=5,368,709,119，预计写 2 字节",
                             "numbered_steps":  "1. 分别尝试生成/参考图/export/贴纸原图/缩略图；2. 查询所有副作用",
                             "expected_response_ui":  "每次 507 STORAGE_CAPACITY_EXCEEDED，返回非敏感状态和 remaining bytes",
                             "expected_db_files":  "storage state 保持由实际量决定；无新 reservation/managed file/latest export/job/ledger/outbox",
                             "forbidden_side_effects":  "上游调用 0；无 staging 残留；不把单个超大请求伪造成持久 full（若现有承诺仍低于上限）",
                             "evidence_files":  "每路由 response.json、db-diff.json、fs-after.json、external-calls.json"
                         },
                         {
                             "case_id":  "TDD-WP2-ERR-001-reference-invalid",
                             "parent_family":  "TDD-WP2-ERR-001",
                             "requirement_ac_source":  "GEN-05、16、17.18、AC-04、44、53",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "格式/大小/数量和非安全型内容不可用四组 fixture；不得使用安全拒绝响应",
                             "numbered_steps":  "1. 分别触发创建前/后无效；2. 检查唯一下一步为“更换或移除参考图”；3. 不改参考图尝试继续；4. 更换/移除后提交",
                             "expected_response_ui":  "category=reference_invalid；未修改时不创建新任务；更换/移除后同项目新增 GenerationJob",
                             "expected_db_files":  "创建前无 job/reserve；创建后 failed+release 一次；修正后保存新的 reference snapshot",
                             "forbidden_side_effects":  "不提供修改提示词、重试、等待、选模型或联系管理员；不映射为 safety_rejected",
                             "evidence_files":  "每 fixture response.json、worker-events.json、db-diff.json、screenshots/reference-invalid.png"
                         },
                         {
                             "case_id":  "TDD-WP4-EXP-001-confirm-pending-edit",
                             "parent_family":  "TDD-WP4-EXP-001",
                             "requirement_ac_source":  "PROJECT-04、06、EXPORT-03、AC-23",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "saved 画布、一次未提交文字/样式编辑、撤销栈深度 U",
                             "numbered_steps":  "1. 打开导出；2. 看到“导出前需要提交当前修改”；3. 确认；4. 等待画布稳定并启动正常自动保存；5. 合成导出；6. 执行一次撤销",
                             "expected_response_ui":  "导出使用确认后的状态；确认使撤销栈 U→U+1 且撤销可回到确认前；导出动作不再增加撤销项",
                             "expected_db_files":  "确认后的完整状态进入正常保存队列；保存成功按 PROJECT-04 增加 state_version；latest 是否更新由后续保存结果决定",
                             "forbidden_side_effects":  "不在确认时产生多条撤销；不以导出额外编辑画布；不导出确认前状态；不跳过自动保存流程",
                             "evidence_files":  "undo-trace.json、network-timeline.json、export-hash.json、trace.zip、screenshots/pending-confirm.png"
                         },
                         {
                             "case_id":  "TDD-WP3-BAL-001-confirmed-recovery",
                             "parent_family":  "TDD-WP3-BAL-001",
                             "requirement_ac_source":  "GEN-14、15、ADMIN-09、AC-51",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "余额导致 model/account/unknown runtime unavailable；无/有真实恢复确认",
                             "numbered_steps":  "1. 未确认时点击恢复；2. 执行非敏感健康检查；3. admin 明确确认；4. 重新计算所有阻断原因",
                             "expected_response_ui":  "无确认失败；确认真实恢复后只解除已满足原因，仍有其他原因则继续 unavailable",
                             "expected_db_files":  "recovery check、GatewayBalanceState/runtime/AdminOperationLog 同事务更新；config set 不变",
                             "forbidden_side_effects":  "不自动恢复/充值，不补扣用户点数，不清除仍存在的 contract/Worker 阻断",
                             "evidence_files":  "response.json、db-diff.json、external-calls.json、screenshots/recovery.png"
                         },
                         {
                             "case_id":  "TDD-WP4-DYN-003-identity-font",
                             "parent_family":  "TDD-WP4-DYN-003",
                             "requirement_ac_source":  "DYN-05 至 09、AC-18、19",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "用户社交 ID 含/不含 @；实例覆盖；DYN012/FONT081",
                             "numbered_steps":  "1. 插入身份贴纸；2. 修改实例覆盖；3. 检查账号资料；4. 插入 DYN012；5. 重开/导出",
                             "expected_response_ui":  "最多一个前导 @；实例覆盖独立且不改账号；DYN012 使用 FONT081 并明确标注替代",
                             "expected_db_files":  "只保存实例 snapshot；UserProfile 不变",
                             "forbidden_side_effects":  "不声称 DIN 字体、不静默回退、不执行 Lua/Prefab、不把覆盖写账号",
                             "evidence_files":  "canvas-state.json、db-diff.json、font-load.json、pixel-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP0-CACHE-001-public-lru",
                             "parent_family":  "TDD-WP0-CACHE-001",
                             "requirement_ac_source":  "NFR-07、17.14、AC-46、48",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "公开资源超过 157,286,400 字节；internal/private/project/提示词 fixture",
                             "numbered_steps":  "1. 按访问顺序填充 public cache；2. 触发写前 LRU；3. 尝试缓存私有类型；4. 枚举 SW/Cache/IndexedDB",
                             "expected_response_ui":  "总量不超上限，淘汰最久未用且当前资源可重取；私有类型均不缓存",
                             "expected_db_files":  "public_asset_lru 只含公开元数据；业务 DB 无变化",
                             "forbidden_side_effects":  "不缓存 internal preview、私有内容、项目、验证码、session、未保存编辑；不计用户下载",
                             "evidence_files":  "cache-enumeration.json、lru-trace.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP0-FILE-001-atomic-commit",
                             "parent_family":  "TDD-WP0-FILE-001",
                             "requirement_ac_source":  "NFR-05、17.19、AC-44、55",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "受控文件驱动；合法/错误 MIME、hash、..、符号链接逃逸；各崩溃点",
                             "numbered_steps":  "1. 流式写 staging；2. 校验/预留；3. 在改名/DB 提交前后终止；4. 重启对账",
                             "expected_response_ui":  "非法输入拒绝；成功对象完整可读；崩溃后恢复为已提交或补偿清理，不出现半对象",
                             "expected_db_files":  "reservation、managed_files、staging/正式文件按提交点一致；启动对账修复计量",
                             "forbidden_side_effects":  "不接受扩展名猜 MIME、不越根、不产生可读半文件/孤儿引用/重复计量",
                             "evidence_files":  "response.json、crash-points.json、db-diff.json、fs-before.json、fs-after.json"
                         },
                         {
                             "case_id":  "TDD-WP2-REF-001-reference-lifecycle",
                             "parent_family":  "TDD-WP2-REF-001",
                             "requirement_ac_source":  "GEN-05、PROJECT-09、AC-44、48",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "新上传、同项目已有 reference、他人/跨项目/撤销/已 purge reference",
                             "numbered_steps":  "1. 提交前在页面选择/移除；2. multipart 新上传；3. 同项目复用；4. 尝试越权/失效；5. 删除项目",
                             "expected_response_ui":  "提交前仅内存；每 job 独立关系快照；仅同 owner+project 可复用；purge 后立即不可读",
                             "expected_db_files":  "成功建立 job reference/managed file；移除前无文件；purge 撤销关系并排清理",
                             "forbidden_side_effects":  "不修改旧任务关系、不跨用户/项目复用、不缓存预提交图片、不暴露路径",
                             "evidence_files":  "每参数 response.json、db-diff.json、fs-after.json、cache-enumeration.json"
                         },
                         {
                             "case_id":  "TDD-WP7-REL-001-final-release-record",
                             "parent_family":  "TDD-WP7-REL-001",
                             "requirement_ac_source":  "NFR-01、09、AC-24、41",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "最终便携 ZIP、START-HERE、SHA-256、RELEASE，真实验收电脑",
                             "numbered_steps":  "1. 校验制品 hash；2. 导入 Windows build/Chrome/Edge 品牌、major/full version；3. 两浏览器跑全部发布 E2E/视觉/性能；4. 比较候选基线",
                             "expected_response_ui":  "RELEASE/制品/诊断/门禁值一致；任一漂移使旧视觉/性能失去发布资格并重跑",
                             "expected_db_files":  "只生成发布记录/证据；业务 fixture 在隔离验收根",
                             "forbidden_side_effects":  "不缺 RELEASE、不手填假版本、不接受前一 major/Chromium、不动态换端口",
                             "evidence_files":  "RELEASE.json、environment.json、package-manifest.json、evidence.json"
                         },
                         {
                             "case_id":  "TDD-WP2-PROJ-002-cas-success",
                             "parent_family":  "TDD-WP2-PROJ-002",
                             "requirement_ac_source":  "PROJECT-04、17.3、AC-20",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "owner project version N，完整合法 Canvas JSON",
                             "numbered_steps":  "1. PUT state with If-Match: N；2. GET project；3. 用相同幂等请求重放",
                             "expected_response_ui":  "首次成功并返回 saved/N+1；重放返回第一次结果",
                             "expected_db_files":  "UPDATE ... state_version=N 命中一行；project_states 新快照，state_version 仅 +1",
                             "forbidden_side_effects":  "不隐式上传/复制/派生资源；不泄漏或接受他人资源引用；不因重放 +2",
                             "evidence_files":  "request.json、response.json、db-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP4-TXT-003-catalog-search-recent",
                             "parent_family":  "TDD-WP4-TXT-003",
                             "requirement_ac_source":  "TEXT-01、17.6、AC-09、32",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "P0-A 32 文字模板、四分类、稳定 catalog、两个用户",
                             "numbered_steps":  "1. 未选模板尝试加文字；2. 按显示名称搜索；3. 检查分类/顺序；4. 使用模板；5. 切换账号读最近使用",
                             "expected_response_ui":  "只能从模板添加；四类/显示名搜索/稳定顺序正确；最近使用按账号隔离",
                             "expected_db_files":  "只在成功使用后更新 recent_assets；未选/搜索不写项目",
                             "forbidden_side_effects":  "不提供独立普通文字，不复用普通贴纸搜索，不跨账号共享最近项",
                             "evidence_files":  "catalog.json、response.json、db-diff.json、trace.zip"
                         },
                         {
                             "case_id":  "TDD-WP1-AUTH-001-final-recheck-race",
                             "parent_family":  "TDD-WP1-AUTH-001",
                             "requirement_ac_source":  "AUTH-01、NFR-04、AC-01、02、45",
                             "fixture_ids":  [
                                                 "FX-INVITE-VALID"
                                             ],
                             "fixture_and_preconditions":  "FX-INVITE-VALID 已成功发码；随后参数化为邀请码耗尽/停用/过期或第 10 个名额被另一事务占用",
                             "numbered_steps":  "1. 完成前改变可变条件；2. 调 REGISTER_COMPLETE；3. 用相同 Idempotency-Key 重试",
                             "expected_response_ui":  "返回对应冻结错误；不建立 session，不进入创作；相同重试返回同一失败结果",
                             "expected_db_files":  "BEGIN IMMEDIATE 后无新 user/profile/credit/consent/session；邀请码次数不增加；名额统计不变",
                             "forbidden_side_effects":  "不出现账号已建但邀请码未核销、邀请码已核销但账号未建或初始点数孤儿流水",
                             "evidence_files":  "response.json、db-diff.json、transaction-trace.json"
                         },
                         {
                             "case_id":  "TDD-WP3-MDL-001-seed-read",
                             "parent_family":  "TDD-WP3-MDL-001",
                             "requirement_ac_source":  "GEN-01、ADMIN-03、17.2、AC-30",
                             "fixture_ids":  [
                                                 "FX-MODEL-SEED"
                                             ],
                             "fixture_and_preconditions":  "全新迁移后的 FX-MODEL-SEED",
                             "numbered_steps":  "1. 启动迁移；2. 调 GET /api/v1/models；3. 查集合约束",
                             "expected_response_ui":  "返回固定三模型；Flash 唯一 configured default；priority 1/2/3；recommended null；三者 contract unverified/runtime unavailable",
                             "expected_db_files":  "一个 current set，三个 immutable member/version，独立 runtime 行",
                             "forbidden_side_effects":  "不把 unverified 标为 available；不生成第二默认；不把 recommended 写配置",
                             "evidence_files":  "response.json、db-diff.json"
                         },
                         {
                             "case_id":  "TDD-WP5-RES-001-three-access-classes",
                             "parent_family":  "TDD-WP5-RES-001",
                             "requirement_ac_source":  "PRIV-02、05、17.12、13、AC-42、48",
                             "fixture_ids":  [

                                             ],
                             "fixture_and_preconditions":  "public、internal_preview、private 资源及不同主体/grant",
                             "numbered_steps":  "1. 请求三类 manifest/资源；2. 推导 stable ID/路径；3. 撤销 grant 后重取；4. 检查 headers/缓存",
                             "expected_response_ui":  "public 可匿名于产品授权范围读取；preview 每次验 grant/no-store；private 仅所有者/受控 admin；越权 403/404",
                             "expected_db_files":  "读取无业务写，访问审计仅私有完整内容规定入口产生",
                             "forbidden_side_effects":  "不混路由/cache header，不返回路径/internal manifest，不用公开 ID 推导私有对象",
                             "evidence_files":  "每主体 response.json、headers.json、cache-enumeration.json"
                         }
                     ]
}
