attribute-normalize
Maps supplier product fields to the retailer taxonomy through the mapping table only, converts units with the calculation shown, and validates every GTIN check digit (GS1). Use after source-ingest, or when the user says "map these to our taxonomy", "are these GTINs valid", "validate these GTINs", "check the GS1 check digit", "normalise the supplier attributes" or "which supplier columns are unmapped". Do NOT use for ad-hoc unit conversions or non-product data - answer in chat instead; do NOT use for completeness or missing fields - use completeness-score instead; do NOT use for claim wording - use claim-check instead.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 107
- Forks
- 120
01 前言 Front Matter
- name
- attribute-normalize
- license
- MIT
- metadata
- { "icon": "ArrowSwap", "author": "Microsoft Retail & CPG Skills", "version": "1.0.5", "category": "analysis" }
- description
- Maps supplier product fields to the retailer taxonomy through the mapping table only, converts units with the calculation shown, and validates every GTIN check digit (GS1). Use after source-ingest, or when the user says "map these to our taxonomy", "are these GTINs valid", "validate these GTINs", "check the GS1 check digit", "normalise the supplier attributes" or "which supplier columns are unmapped". Do NOT use for ad-hoc unit conversions or non-product data - answer in chat instead; do NOT use for completeness or missing fields - use completeness-score instead; do NOT use for claim wording - use claim-check instead.
02 资源文件 6
- 参考文档config/claim-library.json552 B
- 参考文档config/taxonomy-map.json819 B
- 参考文档contracts/rtl.product-content-enrichment.v1.json1.7 KB
- 许可证LICENSE1.1 KB
- 参考文档references/enrichment-rules.md2.0 KB
- 脚本scripts/attribute_normalize.py4.0 KB
03 SKILL.md 正文
Attribute Normalize
Purpose
Deterministic hop: taxonomy mapping (#2.1), UOM conversions shown (#2.2) and GS1 check-digit validation (#1.1) via scripts/attribute_normalize.py. The engine decides; the model quotes.
When to use
- After source-ingest in every batch (
batch.jsonexists). - The user asks whether GTINs are valid or how supplier columns map to the taxonomy.
When NOT to Use
- Kitchen/recipe or generic unit conversions with no product record -> plain chat.
- "How complete is this SKU" / "what's missing" -> use completeness-score instead.
- "Can we say antibacterial" / claim safety -> use claim-check instead.
- Raw supplier sheet not yet structured -> use source-ingest instead.
- Adding or changing taxonomy attributes -> PIM steward decision, never this skill.
Where the data comes from
This plugin ships no sample data. Every input is the user's own Microsoft 365 content:
- Files the user names, links or attaches in the chat (for example a
batch.jsonfrom source-ingest, or the supplier item sheet itself). - Their OneDrive or SharePoint, found with Work IQ search (Microsoft 365 search) by enrichment batch ID (for example
ENR-0000-EXAMPLE), supplier name, GTIN or file name when no location is given. - Email attachments (for example the supplier's item sheet) found the same way.
Read each source with the file reader (ReadFileContent) and cite it by file name and row or page. Write the working JSON files (batch.json when you have to build it, normalized.json) to the session working folder, never into the plugin. If a required source cannot be found, say which one is missing and ask the user where it is. Never invent it, estimate it or fall back to example values.
The taxonomy mapping config/taxonomy-map.json is retailer configuration that ships with the plugin; it is not user data and is never edited here.
Inputs
batch.json (entry hop) from source-ingest earlier in the session or supplied by the user, + config/taxonomy-map.json. If only the supplier item sheet is available, build batch.json from it first exactly as source-ingest does (one record per row: row, gtin verbatim as text, supplier_fields keyed by the supplier's own headers, whole numbers as numbers, other values as the exact text, blanks left out), in this shape:
{"contract_version": "rtl.product-content-enrichment.v1", "batch_id": "ENR-0000-EXAMPLE", "supplier": "Example Supplier Co",
"channel": "own-site", "skus": [{"gtin": "GTIN-EXAMPLE-1", "row": 2, "supplier_fields": {"Product Name": "Example Item", "Weight (lb)": "1.5"}}],
"escalations": []}
For an ad-hoc GTIN list typed in the chat, build a minimal batch (gtin + row "?" ) and say the citations are provisional.
Steps
- Run the engine (tool: shell) with
batch.jsonfrom the session working folder:python scripts/attribute_normalize.py --batch batch.json --taxonomy config/taxonomy-map.json --out normalized.json - Quote
normalized[]verbatim per SKU:gtin_valid, mapped attributes with their mapping entry,conversions[](from -> to, factor),unmapped[]. - An invalid GTIN blocks the record (#1.1). Report the expected vs supplied check digit; never "fix" it by guessing, even when a neighbouring digit would pass.
- Unmapped supplier fields are listed for the PIM steward (#2.1) - never forced into the nearest slot, never added to the taxonomy by the model.
- Hand
normalized.jsonto completeness-score.
Output format
A table per batch: GTIN | GS1 valid | mapped attributes | conversions | unmapped, then a bulleted escalations list, then "Next hop: completeness-score". Sections: Identity, Mapping, Conversions, Escalations.
Grounding requirements
Every attribute cites the item sheet file name and row + mapping entry; every conversion shows the factor.
Guardrails
- Never correct, pad or reconstruct a GTIN; an invalid check digit is a block and a steward escalation, whatever the launch deadline.
- Never invent a mapping or edit
config/taxonomy-map.json; unmapped fields are listed, not guessed. - Never convert a non-numeric value; the engine refuses and lists the field.
- Do not evaluate claims or completeness here; do not publish.
- If
batch.jsonis missing or fails the contract assertion, stop and ask for the source-ingest output - do not fabricate a batch. - Confirm the escalation list with the steward before the batch moves on.
Escalation / uncertainty
Invalid GTINs and unmapped fields -> PIM steward with the engine's escalation lines quoted verbatim.
04 同仓库更多 Skills
work-iq-sphere
Build or refresh a personal "My Work IQ" visual from the signed-in user's own Microsoft 365 work (mail, calendar, Teams chats and the OneDrive and SharePoint files they worked on, with Week, Month and 3 months views from one read of their data, about all their work or one customer, programme or topic they name) as an interactive 3D sphere (self-contained HTML), a customer-safe copy and a matching Microsoft-style PowerPoint slide. Every build is a fresh, evidence-checked analysis of that one person's own data. Use when someone says "build my Work IQ sphere", "show my Work IQ", "refresh" or "update my Work IQ", "make my Work IQ slide", "visualise my work graph", "show me the Work IQ sphere demo", or wants to show customers what Work IQ (context, memory, skills) means using their own work. Do NOT use for generic decks, Work IQ product or licensing questions with no personal data, or anyone else's, team or org-wide analytics.
severity-recordability
Runs the deterministic local v2 draft classifier; reporting/deadlines remain undetermined. Use for "explain blocked reporting determination", "is this recordable", "classify this incident", "what severity is this", or "is this OSHA reportable". Do NOT use for source intake, history retrieval or routing — use incident-intake, ehs-knowledge-retrieve or routing-notify. No diagnosis or operational decision; EHS REVIEW REQUIRED.
routing-notify
Computes proposed investigators and unsent recipients from validated local classification, history and governance. Use for "propose unsent incident recipients", "who investigates this", "route this incident", "who do we notify", or "start the OSHA clock" (only to explain the blocked clock). Do NOT use for classification or terminal drafting — use severity-recordability or incident-writeup. Never sends, files or starts a clock; EHS REVIEW REQUIRED.
incident-writeup
Revalidates and recomputes every terminal v2 hop, then renders a null-aware local Markdown draft and blank RCA template. Use for "prepare an evidence-grounded incident draft", "draft the incident summary", "write up the incident", "give me the RCA template", or "prepare the OSHA writeup". Do NOT use for intake, classification or routing — use incident-intake, severity-recordability or routing-notify. No operational actions; EHS REVIEW REQUIRED.
incident-intake
Preserves cited authorized user-supplied incident files, including real incidents, as v2 inputs for human-reviewed drafts only. Use for "preserve conflicting incident accounts", "intake this incident", "process this safety report", "extract incident facts", or "intake this near miss". Do NOT use for classification, routing or terminal drafting — use severity-recordability, routing-notify or incident-writeup respectively. No live retrieval or official determinations; EHS REVIEW REQUIRED.
ehs-knowledge-retrieve
Attaches cited local OSHA, ISO summaries, JHA and policies and computes supplied-log history. Use for "find cited local safety evidence", "pull the OSHA criteria", "get the JHA", "attach local EHS evidence", or "have we had this incident before". Do NOT use for incident intake, recordability decisions or drafting — use incident-intake, severity-recordability or incident-writeup. No live retrieval; EHS REVIEW REQUIRED.