😫 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)
For Warehouse Managers.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "Excel Diff Tool" Desktop App
**Objective:** A comparison utility to highlight differences between two Excel datasets (e.g., Yesterday vs Today).
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Data Engine: Pandas
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Inputs:** File Selectors for "Reference File" and "New File".
* **Config:** Dropdown to select "Key Column" (Unique ID/SKU).
* **Action:** "Compare" button.
* **View:** Summary of "Added", "Removed", "Changed" rows.
2. **Core Logic:**
* Outer Join on Key Column.
* Detect changes in value columns.
* Export result with color-coded highlighting (using openpyxl/xlsxwriter).
* **Threading:** Comparison runs in background thread.
3. **Deliverables:**
* `main.py`: Complete source code.
* `requirements.txt`: Dependencies.
* **Build Instructions:**
* Windows: `pyinstaller --onefile --noconsole main.py`
* macOS: `pyinstaller --windowed --noconsole main.py`
🧠 Prompt Decoding
- Merge Types: Left, Right, Outer, Inner - control which records appear in diff.
🛠️ Instructions
- Copy Prompt → Specify files → Run.