№ · 任务清单 CH.07.13
主页 · 📃 任务清单 · 2026-07-13-phase1-t3-equipment-fields

2026-07-13-phase1-t3-equipment-fields

📅 2026-07-13 · 📦 7.3 KB · 📃 任务清单 · 📝 MD 文档 🆕 14d 🏷️ 词条🏷️ Phase1🏷️ 装备🏷️ 品质

⟦tag:v2|task|2026-07-13-phase1-t3-equipment-fields⟧ kind: task id: 2026-07-13-phase1-t3-equipment-fields lane: T3 title: Phase 1 装备 T3 字段补齐(R13 callback 后立即派,4-6h,流水化) objective: 收口 AGENTS.md 锁的"接下来 T3" —— Phase 1 装备模型字段补齐(rarity / qualityTier / affixes / setBonus 4 字段 + 16 件装备全填 + Phase 1 6 段投放映射)+ Zod schema + 派生索引 + computeAffixPower 函数。严格三层分离(数据/逻辑/UI 边界)。 scope: docs/design/active/Phase1实施切片-v1.md T3 段, AGENTS.md § 1 三层架构, src/data/items/types.ts(改,加 4 字段 + 16 件装备填值), src/data/items/equipmentSchema.ts(新, Zod), src/utils/items/equipmentLogic.ts(新, 派生索引 + computeAffixPower) acceptance:

  • 只动这 3 个文件;不动 src/components/item/**(UI 留 v1.1 续)/ auction/** / multiplayer/** / AGENTS.md
  • 严格三层分离:数据层(types.ts + equipmentSchema.ts)只放 type/const,逻辑层(equipmentLogic.ts)只放 function
  • 16 件装备 4 字段全填(rarity / qualityTier / affixes / setBonus)
  • Phase 1 6 段投放映射(投放段 enum:day_30 / day_90 / day_180 / day_270 / day_330 / day_360)
  • Zod schema 校验过(无 schema 错误)
  • 派生索引 3 个:EQUIPMENT_BY_ID / EQUIPMENT_BY_QUALITY / EQUIPMENT_BY_SLOT
  • computeAffixPower(affixes): number 纯函数
  • cmd /c npm run build 通过,cmd /c npm run lint 无新增
  • 5 场景单元测试全过

worker sessionId: mvs_887a26b934064feca2320c21bc64067a current state: verified (merge-fix callback absorbed) blockers: none。T1 / T2 / R1-R7 重构全部收口,前置全解。 next action: none in T3;R10-followup remains the downstream product lane。 summary:

  • 这是 AGENTS.md 锁的"接下来 T3"装备模型字段补齐,从 W28 推到 W29 流水化
  • 文件边界零交叉:T3 走 data/items/** + utils/items/equipmentLogic.ts,不撞 R14(endgame/)/ R13(story/)/ R10-followup(multiplayer-lobby/)/ 骨架 sync(纯文档)
  • 严格三层分离:数据层只放 type/const,逻辑层只放 function(沿用 Phase 1 § 1 既有命名 *Logic.ts)

管家派工前真值校准(2026-07-13)

  • EquipmentItem 已在 src/data/items/types.ts 具备 rarity(继承 BaseItem)/qualityTier/affixes/setBonus;不得重写既有模型。
  • 16 件静态装备实际位于 src/data/items/equipment.ts,不是 types.ts;其中 13 件已有字符串 setBonus,3 件基础装备需要显式补 setBonus: null
  • 六段投放映射采用独立静态常量 EQUIPMENT_DROP_PHASE_BY_ID,覆盖全部 16 件,不改既有数值。
  • 当前依赖树没有 zod;为完成卡面 Zod 验收,允许最小修改 package.json + package-lock.json 增加 zod
  • 实际允许文件扩为:src/data/items/types.ts,src/data/items/equipment.ts,src/data/items/equipmentSchema.ts,src/utils/items/equipmentLogic.ts,src/utils/items/equipmentLogic.regression.ts,package.json,package-lock.json
  • equipmentSchema.ts 只放 schema/type/静态映射常量,不得声明业务函数;所有派生索引与 computeAffixPower 留在逻辑层。
  • 现有 equipment.ts 尾部历史派生索引不在本 lane 重构范围;不得继续新增数据层函数。

callback absorbed:

  • formal callback: Mavis communication message #204,from mvs_887a26b934064feca2320c21bc64067a to root,status done
  • duplicate sessions mvs_e23a2b6bea844ecf81907fb00bd6029a / mvs_9f7337db38e44ca2bba34c21746c8522 were aborted;only merge-fix output counts
  • independent verification:npx tsx --test src/utils/items/equipmentLogic.regression.ts = 5/5 passed;cmd /c npm run build passed
  • lint baseline:68,with no equipmentSchema / equipmentLogic / oldLedger / multiRun errors
  • architecture check:data files do not import utils/** or components/**;schema contains no business functions;targeted diff-check passed

prompt(给短工 / 子会话的指令)

角色:[短工]#装备-T3字段补齐@v1.0 lane:T3 时间窗:R13 callback 后立即起 ~ 4-6h 内回 callback(流水化) 承接文档:docs/design/active/Phase1实施切片-v1.md T3 段 前置依赖:✅ T1 / T2 / R1-R7 重构全部收口

任务清单

  1. 数据层:src/data/items/types.ts 加装备模型字段

    • rarity / qualityTier / affixes / setBonus 4 字段
    • 16 件装备全填(沿用现有数据,不重写值)
    • Phase 1 6 段投放映射(投放段 enum:day_30 / day_90 / day_180 / day_270 / day_330 / day_360)
  2. 数据层:src/data/items/equipmentSchema.ts(新)

    • Zod schema 校验:EquipmentItemSchema + AffixSchema + SetBonusSchema
    • src/data/items/types.ts 字段 1:1 对应
  3. 逻辑层:src/utils/items/equipmentLogic.ts(新)

    • 派生索引:EQUIPMENT_BY_ID / EQUIPMENT_BY_QUALITY / EQUIPMENT_BY_SLOT
    • 装备模型派生函数:computeAffixPower(affixes): number
    • 沿用 Phase 1 § 1 既有命名 *Logic.ts

文件边界(强制)

  • ✅ 改:src/data/items/types.ts(加 4 字段 + 16 件装备填值)
  • ✅ 新增:src/data/items/equipmentSchema.ts
  • ✅ 新增:src/utils/items/equipmentLogic.ts
  • ❌ 不动:src/components/item/**(UI 留 v1.1 续)
  • ❌ 不动:auction/** / multiplayer/**
  • ❌ 不动:AGENTS.md(已是当前 § 1 三层架构)

验收

  • cmd /c npm run build 通过
  • cmd /c npm run lint 无新增
  • 16 件装备 4 字段全填,有 Phase 1 6 段映射表
  • Zod schema 校验过(无 schema 错误)
  • 派生索引 3 个(*_BY_ID / *_BY_QUALITY / *_BY_SLOT)
  • 单元测试 5 场景(放 src/utils/items/equipmentLogic.regression.ts): ① 16 件装备 4 字段齐 ② computeAffixPower 单 affix ③ computeAffixPower 多 affix 累加 ④ EQUIPMENT_BY_QUALITY 索引正确 ⑤ EQUIPMENT_BY_SLOT 索引正确

不做

  • ❌ 装备强化 / 精造 8 小系统(留 Phase 3+)
  • ❌ 装备 UI 重做(留 v1.1 续,本轮只补数据 + 逻辑)
  • ❌ 跟拍卖 / 联机对接(留 W30+ 单独 lane)
  • ❌ 改 16 件装备现有数据(只补字段,不重写值)
  • ❌ 改 AGENTS.md

风险 + 缓解

  • 16 件装备 4 字段全填但部分字段留空 → spec 明确:留空 = 空数组 / null,schema 校验通过
  • 派生索引跟现有命名冲突 → 沿用 Phase 1 § 1 既有命名 *Logic.ts,索引前缀 EQUIPMENT_*
  • auctionRules.ts 装备字段冲突 → 严格三层分离,T3 不碰 auction/**

派工触发链(流水化)

  • R13 callback 收到后立即派工(本卡就是流水化第 3 条)
  • T3 callback 收到 → 立即派 R10-followup(docs/handoff/tasks/2026-07-13-r10-browser-walkthrough.md,待起草)
  • 回 T3 callback,R10-followup 派工由管家(本会话)接力

回执模板(短工完成时按这个格式回报主会话)

[T3 #装备-T3字段补齐@v1.0 回执]
- 状态:✅ / ⚠️ / ❌
- 新增文件:<2-3 个实际路径>
- 修改文件:<1 个实际路径>
- 16 件装备 4 字段齐校验:<PASS/FAIL 列表>
- Zod schema 校验:<PASS/FAIL>
- 5 场景测试:<PASS/FAIL 列表>
- `npm run build`:✅ / ❌
- `npm run lint`:无新增 / 新增 N 个
- 风险/阻塞:<如有列出;如无,写 "无">
- 残余风险:<UI 留 v1.1 续;Phase 1 6 段映射表落盘>

回执发送对象:root session(mvs_024c77d9a55549c98e3731c1cc770434),用 mavis communication send --from <你的 session id> --to <root> --command prompt --content "<回执>"


(End of T3 task card)