Deterministic extract + AI diagnosis. Code locks the week and numbers. The AI Agent writes bilingual executive diagnosis for Tab 5 and Teams. It does not calculate PSI math.
Current week W38 Β· Tuesday job = W-2 actual Β· HQ close Wed 15:00
1. Trigger and lock the closed week
2. Extract the same modules used by the PSI HTML
3. Convert, snapshot, inject into existing HTML payloads
5. AI Agent: bilingual diagnosis, not arithmetic
4. Publish the HTML or stop with pending
Weekly rule
Run once every Tuesday 10:00 KST. Wednesday 15:00 is HQ close. Before close the cube is W-2; after close it becomes W-1. Tuesday publishes last closed W-2 actual.
AI does not replace math
Code owns actualWeek, WOS and units. The Agent only writes Tab 5 diagnosis, Top 10 attention text, and the Teams executive card in KR/EN.
MICROSOFT TEAMSW-2 actual + AI briefopen the existing dashboard
β
MICROSOFT TEAMSPending noticedo not use forecast as actual
β
NO OPERATIONStop publishkeep last trusted HTML
β100%+Tidy up
English workflow briefing
Deterministic PSI pipeline + AI diagnosis agent
n8n extracts and locks the closed week with code. The AI Agent then writes bilingual executive text for Tab 5, Top 10 attention, and Teams. It never calculates Sell-Out, WOS or actualWeek.
Why the Agent is here
The 6-tab HTML already has numbers. The remaining HQ gap is weekly interpretation: what changed, which model needs attention, and what managers should inspect. The Agent consumes the validated snapshot and returns structured Korean + Chinese text. If HQ later asks βwhere is AX?β, this node is the answer.
Code still owns
Plan Week offset 37 β 36 β 35
Close-boundary check
Qty / Amt / Inventory / WOS math
Unit conversion and null handling
Actual vs forecast gate
AI Agent owns
Tab 5 PSI management diagnosis copy
Top 10 model attention language
Teams executive card, 3 bullets max
Korean primary, Chinese secondary
Risk wording only: attention / inspect / monitor
Week offset and clock stay unchanged
LATEST PLAN WEEKNdo not query
QUERY SLICEN-1stable Plan Week
ACTUAL SELL-OUTN-2HTML publish week
Tuesday 10:00 KST publishes last closed W-2. Wednesday 15:00 HQ close turns the source into W-1. The Agent is not called on the pending path.