From 772b256f486abde57e1c5b950086c5aba9ea9511 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 7 May 2026 10:25:42 +0000 Subject: [PATCH] Add THE UNIT daily project alert scanner Adds the-unit/unit_alert.py: a small CLI that walks the-unit/The_Unit_Assembly/Hub_*/ folders and prints a daily-dated report of every .py / .txt file still pending review and finalization. - Properly indented, py_compile-clean version of the user's draft - Adds --dir flag to override the default Unit Assembly path - Returns total pending count and ends with a one-action nudge - Ships with three placeholder Hub folders (Lead Generation, CRM Automation, Content Engine) so the script runs out of the box - README documents layout and usage Co-authored-by: fsu9913-gif --- the-unit/README.md | 37 +++++++++ .../Hub_CRM_Automation/.gitkeep | 0 .../Hub_Content_Engine/.gitkeep | 0 .../Hub_Lead_Generation/.gitkeep | 0 the-unit/unit_alert.py | 83 +++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 the-unit/README.md create mode 100644 the-unit/The_Unit_Assembly/Hub_CRM_Automation/.gitkeep create mode 100644 the-unit/The_Unit_Assembly/Hub_Content_Engine/.gitkeep create mode 100644 the-unit/The_Unit_Assembly/Hub_Lead_Generation/.gitkeep create mode 100644 the-unit/unit_alert.py diff --git a/the-unit/README.md b/the-unit/README.md new file mode 100644 index 0000000..adc158f --- /dev/null +++ b/the-unit/README.md @@ -0,0 +1,37 @@ +# THE UNIT — Daily Project Alert + +Personal productivity scanner that walks your local `The_Unit_Assembly/` +directory and lists every `.py` / `.txt` file in each "Hub" subfolder that is +still pending review and finalization. + +## Layout + +``` +the-unit/ +├── unit_alert.py # The scanner script +└── The_Unit_Assembly/ # Master folder; one subfolder per Hub + ├── Hub_Lead_Generation/ + ├── Hub_CRM_Automation/ + └── Hub_Content_Engine/ +``` + +Drop pasted AI-generated code into the appropriate Hub as `.py` or `.txt` +files. Anything sitting in a Hub is treated as "waiting to be finished". + +## Usage + +```bash +# From repo root +python3 the-unit/unit_alert.py + +# Or point at a Unit Assembly folder living elsewhere +python3 the-unit/unit_alert.py --dir /path/to/The_Unit_Assembly +``` + +The script prints a daily-dated banner, lists pending files per Hub, and ends +with a total count plus a one-action nudge ("pick ONE file today"). + +## Tip + +Add it to your morning routine alongside `norcal-toolkit/daily_workflow.py` so +both pipelines (sales follow-ups and code finalization) get a daily ping. diff --git a/the-unit/The_Unit_Assembly/Hub_CRM_Automation/.gitkeep b/the-unit/The_Unit_Assembly/Hub_CRM_Automation/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/the-unit/The_Unit_Assembly/Hub_Content_Engine/.gitkeep b/the-unit/The_Unit_Assembly/Hub_Content_Engine/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/the-unit/The_Unit_Assembly/Hub_Lead_Generation/.gitkeep b/the-unit/The_Unit_Assembly/Hub_Lead_Generation/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/the-unit/unit_alert.py b/the-unit/unit_alert.py new file mode 100644 index 0000000..89c0db2 --- /dev/null +++ b/the-unit/unit_alert.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +""" +THE UNIT — Daily Project Alert +Scans your local Hub directories under ``The_Unit_Assembly`` and prints a +daily list of code files (.py / .txt) that are still pending review and +finalization. + +Usage: + python3 unit_alert.py + python3 unit_alert.py --dir /custom/path/to/The_Unit_Assembly +""" +import argparse +import datetime +import os +import sys + +DEFAULT_UNIT_DIRECTORY = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "The_Unit_Assembly", +) + + +def scan_projects(unit_directory: str) -> int: + """Scan local Hub directories and print a daily alert of pending work. + + Returns the total number of pending files found. + """ + today = datetime.date.today() + print("\n====================================================") + print(f" 🚨 THE UNIT: DAILY PROJECT ALERT for {today} 🚨") + print("====================================================\n") + + if not os.path.exists(unit_directory): + print(f"Directory '{unit_directory}' not found.") + print("Please create it and add your 'Hub' folders to get started.") + return 0 + + hubs = sorted( + f.name for f in os.scandir(unit_directory) if f.is_dir() + ) + + if not hubs: + print("Your Unit directory is currently empty.") + print("Action: Run the AI Extraction Prompts and paste the code into your Hubs!") + return 0 + + total_files = 0 + + for hub in hubs: + hub_path = os.path.join(unit_directory, hub) + files = sorted( + f for f in os.listdir(hub_path) + if f.endswith(".py") or f.endswith(".txt") + ) + + print(f"📁 HUB: {hub.replace('_', ' ').upper()}") + if not files: + print(" - Empty (No pending tasks here)") + else: + for file in files: + print(f" 📄 {file} -> Status: Needs review and finalization") + total_files += 1 + print("") + + print(f"--- Summary: You have {total_files} pieces of code waiting to be finished. ---") + print("Pick ONE file today, share it with your Coding Partner, and let's complete it.") + return total_files + + +def main() -> int: + parser = argparse.ArgumentParser(description="THE UNIT — Daily Project Alert") + parser.add_argument( + "--dir", + default=DEFAULT_UNIT_DIRECTORY, + help=f"Path to The_Unit_Assembly directory (default: {DEFAULT_UNIT_DIRECTORY})", + ) + args = parser.parse_args() + scan_projects(args.dir) + return 0 + + +if __name__ == "__main__": + sys.exit(main())