AgentSkillsCN

Inventory Quantity

库存数量管理系统及其应用方法

SKILL.md
--- frontmatter
description: Inventory quantity systems and how to apply them
category: Planning
boundary: Monorepo (be/ and fe/)
version: 1.0

Inventory Quantity Model

This repo tracks product quantity in two distinct systems. Treat them as separate sources unless a feature explicitly asks to combine.

1) Inventory Balance (Base Unit per Storage)

  • What it is: per-storage on-hand quantity in base units.
  • Source: ProductResponse.stocks[] (inventory balances).
  • Use for: storage-level summaries, base-unit totals by warehouse.

2) Lot/Container Remaining (Lot System)

  • What it is: remaining qty per lot/container (lot lifecycle tracking).
  • Source: GetContainerLots (container lots), plus inventory lots where applicable.
  • Use for: lot-level tables, container tracking, per-lot adjustments.

Rules of Thumb

  • Do not merge by default: InventoryBalance and lot/container remaining are different definitions.
  • Only combine when explicitly required: if a feature explicitly needs a unified total.
  • Do not backfill storage totals from lots: storage summaries should use InventoryBalance unless the feature demands lot-based totals.

Agent Guidance

  • When working on product quantity, identify which system the feature refers to.
  • If a change spans API contracts, update proto first and regenerate via task gen -- <pkg>.