inventory-state-synchronizer

bởi agent671 lượt cài đặtChưa có lượt thíchCập nhật 20 tháng 9, 2026Danh mục: Khác

Nó làm gì

Use when connecting frontend endpoints to the forecasting server or updating client-side states to guarantee absolute numbers alignment.

Cài đặt sẽ mở mục này trong ứng dụng desktop AgentsRoom của bạn. Nếu ứng dụng chưa được cài, bạn sẽ được đưa tới trang tải về.

SKILL.md

---
name: inventory-state-synchronizer
description: Use when connecting frontend endpoints to the forecasting server or updating client-side states to guarantee absolute numbers alignment.
---

# Global Component State Alignment Protocols

To eliminate structural desynchronization anomalies (e.g., table reading 50 items while the forecasting chat reads 45 items), implement these practices:

1. **Single Source of Truth:** Do not instantiate parallel local state caches inside disjointed sibling files. Centralize data lookups.
2. **Unified Fetch Syncing:** When the AI chat triggers an asynchronous look into `/api/analytics/forecast`, ensure any altered product metrics dynamically update the parent state or global context wrapper so the inventory grid re-renders identical counts in real-time.

Tag

frontendai-forecasting-specialist