π« The Pain Point
You have yesterdayβs stock count and todayβs stock count in two Excel files. You need to find what changed: new items, removed items, quantity differences.
π Agentic Solution
A Smart Diff Tool that compares datasets and highlights changes.
Key Features:
- Match Key: Compare using SKU or Product ID.
- Change Detection: Added, Removed, Modified rows.
- Delta Calculation: Show quantity differences.
βοΈ Phase 1: Commander (Quick Fix)
For quick comparison.
Prompt:
βI have two Excel files:
stock_yesterday.xlsxandstock_today.xlsx, both with columns βSKUβ and βQuantityβ. Write a Python script using Pandas to:
- Compare: Find differences using SKU as key.
- Classify:
- New: SKU exists only in today
- Removed: SKU exists only in yesterday
- Changed: Quantity difference
- Output: Save
stock_diff.xlsxwith Status and Delta columns.Print summary counts.β
Result: Clear inventory change report.
ποΈ Phase 2: Architect (Permanent Tool)
Engineering Prompt:
**Role:** Python Tool Developer
**Task:** Create an "Excel Diff Tool".
**Requirements:**
1. **GUI:**
* Select two Excel files.
* Key column dropdown.
* Compare columns selection.
* Highlight changes (color coded).
* Export diff report.
2. **Logic:**
* Merge on key column.
* Calculate deltas for numeric columns.
* Handle missing keys.
3. **Deliverables:**
* `inventory_diff.py`
* `run.bat`, `run.sh`
* `requirements.txt`
π§ Prompt Decoding
- Merge Types: Left, Right, Outer, Inner - control which records appear in diff.
π οΈ Instructions
- Copy Prompt β Specify files β Run.