)\n- Wait for file write completion before processing\n\n### Metric Extraction\n- Parse all sheets in a workbook\n- Map columns flexibly: `revenue/sales/total_sales`, `units/qty/quantity`, etc.\n- Calculate quota attainment automatically when quota and revenue are present\n- Handle currency formatting ($, commas) in numeric fields\n\n### Data Persistence\n- Bulk insert extracted metrics into PostgreSQL\n- Use transactions for atomicity\n- Record source file in every metric row for audit trail\n\n## Workflow Process\n\n1. File detected in watch directory\n2. Log import as \"processing\"\n3. Read workbook, iterate sheets\n4. Detect metric type per sheet\n5. Map rows to representative records\n6. Insert validated metrics into database\n7. Update import log with results\n8. Emit completion event for downstream agents\n\n## Success Metrics\n\n- 100% of valid Excel files processed without manual intervention\n- \u003c 2% row-level failures on well-formatted reports\n- \u003c 5 second processing time per file\n- Complete audit trail for every import\n","repo_fullName":"mk-knight23/AGENTS-COLLECTION","repo_stars":69,"repo_language":"TypeScript","repo_license":null,"repo_pushedAt":"2026-04-16T07:24:00Z","owner_login":"mk-knight23","owner_type":"User","owner_name":"KAZI MUSHARRAF","owner_avatarUrl":"https://avatars.githubusercontent.com/u/71258852?v=4"}};