Now I have enough data. Let me write the complete System Learning Report.
| Date | Category | Idea Summary | Status | Notes |
|---|---|---|---|---|
| 3/15/2026 | GENERAL | Salon Automation Platform — package CCH automation as a sellable product for the salon industry | NOT STARTED — STRATEGIC PRIORITY | No prior processing. Major product vision. See recommendation below. |
| 3/9/2026 | DASHBOARDS | Inventory Dashboard — product expenses vs sales, profit, PPC ratio, promo tracking | PARTIALLY COMPLETE | YCS_Inventory_Dashboard_2026.html exists. Missing: vendor invoice expense cross-check, PPC promo tracking layer. Data exists to build this. |
| 3/9/2026 | DASHBOARDS | P&L Dashboard with Quicken integration | PARTIALLY COMPLETE | YCS_PL_Flow.html built. Quicken CSV parse in place. Expense email pipeline built but broken (see critical issue below). |
| 3/9/2026 | DASHBOARDS | Agent Run Status Dashboard | COMPLETE | Agent_Status_Dashboard.html live, refreshed daily. |
| 3/9/2026 | NEW AGENTS | Kaeleigh Manager Mentor Coach agent | COMPLETE | kaeleigh_mentor_agent.sh live, runs Tuesdays, Education Dashboard + 1:1 notes pipeline active. |
| 3/9/2026 | NEW AGENTS | M&A deal tracking agent / deal pipeline | COMPLETE | YCS_Deal_Pipeline.html built, Deal Agent running Wednesdays. |
Salon Platform Idea (highest priority / IDEAS FOR YOU TO HELP ME): This is a real product concept worth developing. Initial framework: - Phase 1 (3 months): Document the CCH system as a replicable template. Create intake questionnaire: POS system (Phorest/Boulevard/Vagaro?), email access, data sources, employee count, reporting needs. - Phase 2: Build a "Salon OS Starter Kit" — portable runner.sh + ingest pipeline + 3 core dashboards (Payroll, Inventory, P&L). Target: install on customer's Mac mini for $5K setup + $500/month. - Cloud path: AWS would work — EC2 + S3 + Lambda for triggers. Not overkill if you're selling 5+ salons. Cost ~$80-150/month per installation. - Test case: Matthew Morris acquisition is the perfect beta — already have MM infrastructure starting up. - READY TO BUILD: Salon intake questionnaire + implementation checklist (data sources, folder structure, agent config). Can draft this now.
From coo_corrections.md (3/11/2026):
Q: What has been Jane Iredale YTD sales and # of units?
A: From inventory_on_hand.csv and sales_transactions.csv — Jane Iredale shows as 28.5% of inventory value with 21% sell-through. Based on the 3/11 COO scan data: YTD unit counts are available in sales_transactions but require a specific query against brand='Jane Iredale' + item_type=Retail. The COO scan noted "-3 units (returns) on Mar 2" as the most recent signal. Recommend running a dedicated Jane Iredale brand pull from DuckDB: SELECT SUM(quantity) as units, SUM(gross) as revenue FROM sales_transactions WHERE data_date >= '2026-01-01' AND item_name ILIKE '%iredale%'.
Confidence: MEDIUM — data exists, exact figure requires a script run.
Source: sales_transactions.csv, inventory_on_hand.csv, 3/11 COO scan.
Q: Tashina Miranda — check her production trend again. A: No specific alert in recent COO scans. Her trend should be visible in staff_performance.csv. The 3/11 concern noted she had production worth reviewing. Recommend pulling her 13-week rolling average service sales. No blocking issue identified this week. Confidence: LOW — requires dedicated query.
None applied this run — all findings require human confirmation or code edits.
| Agent | Runs This Week | OK | Fail | Notes |
|---|---|---|---|---|
| Briefing Compiler | 7 | 7 | 0 | ✅ Solid. 87-90s runtime, 1-attempt success all week. |
| Ingest Daily | 7 | 7 | 0 | ✅ 20 files/day, ~3600 rows/day. Minor datetime parse warnings (8-9 rows/day) — non-blocking. |
| Phorest Router | 7 | 7 | 0* | ⚠️ Routes correctly but 3 unmatched ZIPs today (over-long names). grep -P fires 28+ times/run (noisy). |
| COO Agent (daily) | 7 | 7 | 0 | ✅ 78s runtime, clean outputs. |
| Payroll Dashboard | 7 | 7 | 0 | ✅ 20s runtime, 22 employees, $172K gross YTD. PTO file warning (expected — no file). |
| Expense Email Extract | 7 | 0 | 7 | 🔴 FAILING EVERY DAY — Python syntax error (see critical issues). |
| Slack Write-back | 7 | 0 | 7 | 🔴 FAILING EVERY DAY — missing_scope token error. |
| Slack Archive Sync | 7 | 7 | 0 | ✅ Running but 0 new messages most days (Sunday morning off-hours expected). 87 archived total. |
| Dashboard Health Check | 7 | 7 | 0 | ✅ 14/14 dashboards fresh today. 0 stale. |
| Inventory Dashboard | 7 | 7 | 0 | ⚠️ 2,053 potential duplicate warning every run. Non-blocking but growing. |
| CEO Dashboard | 7 | 7 | 0 | ✅ 8 HIGH alerts in pipeline_alerts.json — but most are stale from Mar 24-25 (since resolved). |
| Vendor Learning | 7 | 7 | 0 | ✅ No new unknown invoices this week. |
| Calendar Export | 7 | 7 | 0 | ✅ 180s runtime (slow but succeeds). 12 events exported. |
| Data Source | Last Updated | Expected | Status |
|---|---|---|---|
| sales_transactions.csv | 2026-03-29 20:36 | Daily | 🟢 Fresh |
| inventory_on_hand.csv | 2026-03-29 20:36 | Daily | 🟢 Fresh |
| staff_performance.csv | 2026-03-29 20:36 | Daily | 🟢 Fresh |
| tips.csv | 2026-03-29 20:36 | Daily | 🟢 Fresh |
| clock_in_out.csv | 2026-03-29 20:36 | Daily | 🟢 Fresh |
| gc_sold.csv | 2026-03-29 06:00 | Daily | 🟢 Fresh |
| gc_redeemed.csv | 2026-03-29 06:00 | Daily | 🟢 Fresh |
| gc_outstanding.csv | 2026-03-29 06:00 | Daily | 🟢 Fresh |
| appointments.csv | 2026-03-29 06:00 | Daily | 🟢 Fresh |
| ycs_expenses.csv | NOT UPDATED (extract_expense_emails.py broken) | Daily | 🔴 Stale |
| Bank CSVs (Chase) | Manual upload | Monthly | ⚠️ Unknown — last upload not verified |
| ycs_budget_2026.csv | 2026-03-29 08:34 | Static | 🟢 Current |
1. Fix extract_expense_emails.py — Python 3.9 union type incompatibility
- Error: TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' at line 286
- Root cause: def parse_amount(text: str) -> float | None: uses Python 3.10+ union syntax
- Fix: Change float | None → Optional[float] and add from typing import Optional at top of file
- Impact: Expense pipeline has been dead for ~3 days; ycs_expenses.csv is stale. CEO Dashboard is showing $0 for many expense categories.
- Auto-apply candidate: Yes — safe, mechanical fix.
2. Fix Slack write-back missing_scope error
- Error: [SLACK-WB] ERROR: missing_scope on every chat:write attempt
- Root cause: The YCS Archive Bot token was granted read scopes but the chat:write scope was not added when the pipeline was created.
- Fix: In the Slack App settings for YCS Archive Bot, add chat:write OAuth scope → reinstall app → update SLACK_BOT_TOKEN in config.env if token changes
- Impact: Pipeline run completions have never been posted to #coo-corrections or #agent-ideas. Philip sees no write-back confirmations.
3. Clear stale pipeline_alerts.json entries - The file has 8+ HIGH alerts from Mar 24-25 that are now resolved (gc_outstanding is fresh, dashboards are all current). CEO Dashboard reports "8 HIGH alerts" which is misleading. - Fix: Truncate or filter alerts older than 7 days in pipeline_alerts.json, or add an alert-clearing step to the morning pipeline. - Auto-apply candidate: Yes — safe. Old alerts should age out.
4. Fix grep -P → grep -E in phorest_router.sh
- grep -P (Perl regex) is not supported on macOS BSD grep. It fires a usage error on every single ZIP file processed (28+ times today).
- Fix: Replace grep -P with grep -E throughout phorest_router.sh. The patterns being used don't require Perl-specific features.
- Impact: Cosmetic but extremely noisy logs — makes it hard to spot real errors.
5. Address Megan King removal (COO correction from 3/11 — still unprocessed)
- Megan King was terminated 3/7/2026. COO correction posted 3/11 says to remove her from GLOBAL_CONFIG and bonus calculator.
- The payroll dashboard today still shows 22 active employees. Need to confirm Megan is excluded.
- Recommend: Verify data/employees.csv shows Megan as inactive/terminated. Check payroll_overrides.json for any active entries.
6. Install duckdb
- Daily warning: duckdb not installed — falling back to csv.DictReader fires on 6 generators
- Fix: pip install duckdb --break-system-packages (noted in CLAUDE.md but not yet done)
- Impact: Performance — DuckDB would be ~10x faster on 123K+ row sales_transactions queries
7. Investigate 2,053 duplicate transaction warning
- generate_inventory_dashboard.py reports 2,053 potential duplicate rows every run
- The ingest dedup already runs (reported ✅ sales dedup: no cross-source duplicates found today)
- The dashboard may be using a looser duplicate check than ingest. Worth aligning the detection logic.
8. Unmatched over-prefixed ZIPs in Phorest Router - 3 files today had filenames too long (chained re-queue prefixes truncated the actual report name) - These are old queued files and will self-clear as they get processed - Long-term fix: Add a "strip all leading date-prefixes" step in router before route matching
9. Salon Platform — begin intake questionnaire - Philip's 3/15 idea is actionable now - Suggest starting with a 1-page "Salon Onboarding Questionnaire" document: POS system type, email provider, employee count, what reports they currently have, goals - Matthew Morris is the first live test case — use the MM setup as the template documentation effort
| Issue | Occurrence | Severity | Action Needed |
|---|---|---|---|
extract_expense_emails.py Python type error |
Daily (7+ days) | 🔴 HIGH | Fix now |
Slack write-back missing_scope |
Daily (7+ days) | 🔴 HIGH | Add chat:write to bot scopes |
grep -P not supported on macOS |
Daily (28+ times/run) | 🟡 MEDIUM | Replace with grep -E |
| duckdb not installed warning | Daily (6 generators) | 🟡 MEDIUM | pip install duckdb |
| Duplicate transaction warning (2,053) | Daily | 🟡 MEDIUM | Investigate alignment |
| stale pipeline_alerts.json entries | Since Mar 25 | 🟡 MEDIUM | Clear resolved alerts |
2026-03-29: extract_expense_emails.py confirmed failing daily — Python 3.10 union syntax (float | None) incompatible with macOS Python 3.9; fix: use Optional[float] from typing
2026-03-29: Slack write-back (chat:write) has been failing every day since deployment — YCS Archive Bot token missing chat:write OAuth scope; ycs_expenses.csv stale as side effect
2026-03-29: System Learning Run #2 — 7-day pipeline review; all data tables fresh; 14/14 dashboards OK; 2 critical recurring failures identified (expense extract + Slack write-back)
AGENT_COMPLETE