📦
shinae.workWarehouse Super-agent

A stock movement with receipts — not a spreadsheet with opinions. 改一次库存,留一条证据链:不是一张有意见的表格。

The same kernel that runs the carbon ledger now runs lots: green coffee leaves FIFO, roasted coffee leaves FEFO, an expired or quarantined lot can never be picked, and every quantity change passes plan → critic → dry-run → a second person → execute → verify, with each step hashed into a chain. 同一个内核跑第二个垂直域:绿咖啡 FIFO、熟豆 FEFO,过期与隔离批次永不被选中; 每次改数量都要过计划 → Critic → dry-run → 第二个人 → 执行 → 核验,每一步都进哈希链。

Static snapshot, not a live system. GitHub Pages cannot run the Python kernel. Numbers below were generated 2026-11-22T15:25:16Z from a local database of synthetic demo data; the interactive panel runs on your machine.
本页是静态快照:数字由本地内核在 2026-11-22T15:25:16Z 从合成演示数据生成;可交互的面板在你自己的机器上运行。
2440 kggreen coffeereleasable 2140 kg
154 kgroastedreleasable 90 kg
364 kgblocked by gateexpired / quarantined
18 kgexpiring ≤ 10 d1 lots
2awaiting approvala person must sign
3open alertsenv · expiry · low stock

The loop why it is a gate, not a chat

submit ──► awaiting_approval ──approve──► done ──verify──► reflect
   │                │
   │                └──reject──► rejected
   └─critic fails──► blocked        (no movement, ever)

plan.created → critic.evaluated → dryrun.computed
            → approval.requested ─► approval.granted | rejected
            → executed ─► verified            (+ four_eyes.waived on --force)

PLANNER

Pure functions of the store: allocation order, quantities, shortfall, excluded lots.

计划是数据库的纯函数:分配顺序、数量、缺口、被排除的批次都能重放。

CRITIC

Deterministic checks: SKU exists, unit is kg, stock suffices, lots are released and not expired.

确定性校验:SKU、单位、库存、批次状态、赏味期,逐条给理由。

FOUR EYES

The requester cannot approve. A forced approval is written into the hash chain, not hidden.

申请人不能批准;强行批准会写进哈希链,不会消失。

Snapshot · lots 9 lots · ledger consistent

lotskukgstorestatusbest befored→BBgate
L-BR-2611G-BR940.0WH-Greleased2027-10-28340pickable
L-CO-2612G-CO300.0WH-Qquarantine2027-11-14357status=quarantine
L-ET-2605G-ET680.0WH-Greleased2027-07-25245pickable
L-YN-2608G-YN520.0WH-Greleased2027-09-23305pickable
L-R-BR-ESP30.0WH-Rreleased2026-12-1018pickable
L-R-ER-ESP55.0WH-Qquarantine2026-12-1422status=quarantine
L-R-AR-ESP42.0WH-Rreleased2026-12-1927pickable
L-R-DR-V609.0WH-Rreleased2026-11-19-3best_before passed
L-R-CR-V6018.0WH-Rreleased2026-11-286pickable

Snapshot · tasks every stage hashed

taskstagekindbycriticchain
R-V60 出库 6.0 kg(FEFO)doneoutboundpanel:erik8/8 pass7 rows
WH-R 环境超限:隔离 4 个批次awaiting_approvalenvwh.scan2/2 pass3 rows
补货建议 1 个 SKUawaiting_approvalpurchasepanel:erik0/0 pass2 rows

Snapshot · audit chain last 8 rows

attaskstepactorhash
2026-11-22T15:08wht_e746d864b44dapproval.requestedsupervisor206e9a183b8bf9…
2026-11-22T15:08wht_e746d864b44dplan.createdpanel:erik2f68e6839b01bc…
2026-11-22T15:08wht_d3f35a0d0339approval.requestedsupervisore0890eb61c0d08…
2026-11-22T15:08wht_d3f35a0d0339critic.evaluatedcritic1323b56d678c9f…
2026-11-22T15:08wht_d3f35a0d0339plan.createdwh.scan0b5da5a3686215…
2026-11-22T15:08wht_bb7da9551b0cverifiedverifier29fb4bf5b9ece7…
2026-11-22T15:08wht_bb7da9551b0cexecutedpanel:approverfcba9b370072ce…
2026-11-22T15:08wht_bb7da9551b0capproval.grantedpanel:approverd8301c2d320926…

Each row hashes prev_hash + {task, step, actor, data}. Editing one row breaks every later row; /wh verify <task> recomputes the chain. 每行哈希覆盖前一行哈希与本次内容;改一行,后面全断。

Working together with Feishu compose, don't replace

Feishu is where people already are. The agent is where the rules and the proof live. Each side keeps what it is good at: 飞书负责"人已经在的地方",Agent 负责"规则和证据"。各做各自最强的部分。

job to be doneFeishu doesthis agent doesshared seam
alert someone, nowgroup bot + interactive card: 批准 / 驳回 buttonsraises the alert, files the approval task, keeps the dry-runa button click re-enters approve() — same four eyes, same chain
ask a question in chatmessage + @bot/wh stock, /wh lot L-ET-2605, /wh envanswers in the same thread the question came from
collect field dataBitable: forms, views, offline entryconsumes records as inbound drafts; master quantity stays in wh_moveno double write: Bitable is intake, the ledger is truth
assign the follow-upTask: owner, due date, reminderscreates the task with impact scope (which lots, how many kg)task id stored on the warehouse task
schedule arrival / stocktakeCalendarproposes the window after approvalone event per approved inbound or stocktake
write the post-mortemDocs / Wikireplays the audit chain for the incidentagent drafts, a person edits and owns it
prove who changed a quantityweak point: the sheet says 42, nobody knows who typed itstrong point: move ledger + hash chain + four eyesFeishu shows the decision, the agent shows the evidence

Chat surface same gate as the panel

/wh                     overview: stock, approvals, alerts, consistency
/wh stock [green|roast]  lots that can leave today
/wh lot L-ET-2605        one lot + its movements
/wh out R-V60 20 fefo    plan → critic → card → approval
/wh in G-ET 300 WH-G 11.2  inbound with moisture
/wh approve wht_xxx      four eyes; --force is chained
/wh scan | /wh expire     environment / shelf-life sweeps
/wh stocktake L-ET-2605 671.5   count diff → approval
/wh buy                  replenishment drafts
/wh verify wht_xxx       recompute the hash chain
/wh consistency          lot cache vs move ledger

Hard rules

Boundary

Status

This is a local prototype: the kernel, panel and tests run on one machine against SQLite. The page you are reading is a capability statement plus a real snapshot — not an API. The warehouse kernel source is not public yet; the carbon half of the same kernel is public at github.com/erikcywong/shinae.work. 内核、面板与测试在本机跑;这一页是能力说明加真实快照,不是 API。 仓存内核源码暂未公开;同一内核的碳核证部分已公开。

Verification is a domain smoke test (allocation order, critic blocks, four eyes, idempotent movements, chain tamper) plus a headless render check of every panel view. 验证方式是领域测试(分配顺序、Critic 拦截、四眼、幂等、链篡改)+ 面板每个视图的无浏览器渲染检查。