From 15cb55a85f25e465678b72f7bf5fa8089a68f68b Mon Sep 17 00:00:00 2001 From: AIOSAI Date: Fri, 6 Mar 2026 16:35:10 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20chore(apps):=20remove=20example?= =?UTF-8?q?=20app=5Fdevelopment=20and=20website=5Fdesign=20standards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - delete all files and directories related to app_development.example and website_design.example - remove branch.py orchestrators, handlers, modules, and plugins example packages - clean up legacy example code to reduce clutter and maintain only active standards --- .../app_development.example/apps/__init__.py | 1 - .../app_development.example/apps/branch.py | 86 ------------------- .../apps/handlers/__init__.py | 0 .../apps/modules/__init__.py | 0 .../apps/plugins/__init__.py | 0 .../website_design.example/apps/__init__.py | 1 - .../website_design.example/apps/branch.py | 86 ------------------- .../apps/handlers/__init__.py | 0 .../apps/modules/__init__.py | 0 .../apps/plugins/__init__.py | 0 10 files changed, 174 deletions(-) delete mode 100644 src/aipass/seedgo/apps/standards/app_development.example/apps/__init__.py delete mode 100644 src/aipass/seedgo/apps/standards/app_development.example/apps/branch.py delete mode 100644 src/aipass/seedgo/apps/standards/app_development.example/apps/handlers/__init__.py delete mode 100644 src/aipass/seedgo/apps/standards/app_development.example/apps/modules/__init__.py delete mode 100644 src/aipass/seedgo/apps/standards/app_development.example/apps/plugins/__init__.py delete mode 100644 src/aipass/seedgo/apps/standards/website_design.example/apps/__init__.py delete mode 100644 src/aipass/seedgo/apps/standards/website_design.example/apps/branch.py delete mode 100644 src/aipass/seedgo/apps/standards/website_design.example/apps/handlers/__init__.py delete mode 100644 src/aipass/seedgo/apps/standards/website_design.example/apps/modules/__init__.py delete mode 100644 src/aipass/seedgo/apps/standards/website_design.example/apps/plugins/__init__.py diff --git a/src/aipass/seedgo/apps/standards/app_development.example/apps/__init__.py b/src/aipass/seedgo/apps/standards/app_development.example/apps/__init__.py deleted file mode 100644 index 91047046..00000000 --- a/src/aipass/seedgo/apps/standards/app_development.example/apps/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# {{BRANCHNAME}} apps package diff --git a/src/aipass/seedgo/apps/standards/app_development.example/apps/branch.py b/src/aipass/seedgo/apps/standards/app_development.example/apps/branch.py deleted file mode 100644 index ef38d681..00000000 --- a/src/aipass/seedgo/apps/standards/app_development.example/apps/branch.py +++ /dev/null @@ -1,86 +0,0 @@ -""" -{{BRANCHNAME}} Branch - Main Orchestrator - -Auto-discovery architecture: -- Scans modules/ directory for .py files with handle_command() -- Routes commands to discovered modules automatically -- No manual imports or routing needed -""" - -import sys -import importlib -from pathlib import Path -from typing import List, Any - -from aipass.prax import logger - -# ============================================================================= -# MODULE DISCOVERY -# ============================================================================= - -MODULES_DIR = Path(__file__).parent / "modules" - - -def discover_modules() -> List[Any]: - """Auto-discover modules in modules/ directory.""" - modules = [] - - if not MODULES_DIR.exists(): - return modules - - for file_path in MODULES_DIR.glob("*.py"): - if file_path.name.startswith("_"): - continue - - module_name = f"apps.modules.{file_path.stem}" - - try: - module = importlib.import_module(module_name) - if hasattr(module, "handle_command"): - modules.append(module) - except Exception as e: - logger.error(f"[{{BRANCHNAME}}] Failed to load module {module_name}: {e}") - - return modules - - -def route_command(command: str, args: List[str], modules: List[Any]) -> bool: - """Route command to appropriate module.""" - for module in modules: - try: - if module.handle_command(command, args): - return True - except Exception as e: - logger.error(f"[{{BRANCHNAME}}] Module {module.__name__} error: {e}") - return False - - -# ============================================================================= -# MAIN ENTRY POINT -# ============================================================================= - -def main(): - """Main entry point - routes commands or shows help.""" - modules = discover_modules() - args = sys.argv[1:] - - if len(args) == 0 or args[0] in ["--help", "-h", "help"]: - print(f"{{BRANCHNAME}} - {len(modules)} modules discovered") - for module in modules: - name = module.__name__.split(".")[-1] - desc = (module.__doc__ or "").strip().split("\n")[0] if module.__doc__ else "No description" - print(f" {name:20} {desc}") - return 0 - - command = args[0] - remaining = args[1:] if len(args) > 1 else [] - - if route_command(command, remaining, modules): - return 0 - - print(f"Unknown command: {command}") - return 1 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/src/aipass/seedgo/apps/standards/app_development.example/apps/handlers/__init__.py b/src/aipass/seedgo/apps/standards/app_development.example/apps/handlers/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/aipass/seedgo/apps/standards/app_development.example/apps/modules/__init__.py b/src/aipass/seedgo/apps/standards/app_development.example/apps/modules/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/aipass/seedgo/apps/standards/app_development.example/apps/plugins/__init__.py b/src/aipass/seedgo/apps/standards/app_development.example/apps/plugins/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/aipass/seedgo/apps/standards/website_design.example/apps/__init__.py b/src/aipass/seedgo/apps/standards/website_design.example/apps/__init__.py deleted file mode 100644 index 91047046..00000000 --- a/src/aipass/seedgo/apps/standards/website_design.example/apps/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# {{BRANCHNAME}} apps package diff --git a/src/aipass/seedgo/apps/standards/website_design.example/apps/branch.py b/src/aipass/seedgo/apps/standards/website_design.example/apps/branch.py deleted file mode 100644 index ef38d681..00000000 --- a/src/aipass/seedgo/apps/standards/website_design.example/apps/branch.py +++ /dev/null @@ -1,86 +0,0 @@ -""" -{{BRANCHNAME}} Branch - Main Orchestrator - -Auto-discovery architecture: -- Scans modules/ directory for .py files with handle_command() -- Routes commands to discovered modules automatically -- No manual imports or routing needed -""" - -import sys -import importlib -from pathlib import Path -from typing import List, Any - -from aipass.prax import logger - -# ============================================================================= -# MODULE DISCOVERY -# ============================================================================= - -MODULES_DIR = Path(__file__).parent / "modules" - - -def discover_modules() -> List[Any]: - """Auto-discover modules in modules/ directory.""" - modules = [] - - if not MODULES_DIR.exists(): - return modules - - for file_path in MODULES_DIR.glob("*.py"): - if file_path.name.startswith("_"): - continue - - module_name = f"apps.modules.{file_path.stem}" - - try: - module = importlib.import_module(module_name) - if hasattr(module, "handle_command"): - modules.append(module) - except Exception as e: - logger.error(f"[{{BRANCHNAME}}] Failed to load module {module_name}: {e}") - - return modules - - -def route_command(command: str, args: List[str], modules: List[Any]) -> bool: - """Route command to appropriate module.""" - for module in modules: - try: - if module.handle_command(command, args): - return True - except Exception as e: - logger.error(f"[{{BRANCHNAME}}] Module {module.__name__} error: {e}") - return False - - -# ============================================================================= -# MAIN ENTRY POINT -# ============================================================================= - -def main(): - """Main entry point - routes commands or shows help.""" - modules = discover_modules() - args = sys.argv[1:] - - if len(args) == 0 or args[0] in ["--help", "-h", "help"]: - print(f"{{BRANCHNAME}} - {len(modules)} modules discovered") - for module in modules: - name = module.__name__.split(".")[-1] - desc = (module.__doc__ or "").strip().split("\n")[0] if module.__doc__ else "No description" - print(f" {name:20} {desc}") - return 0 - - command = args[0] - remaining = args[1:] if len(args) > 1 else [] - - if route_command(command, remaining, modules): - return 0 - - print(f"Unknown command: {command}") - return 1 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/src/aipass/seedgo/apps/standards/website_design.example/apps/handlers/__init__.py b/src/aipass/seedgo/apps/standards/website_design.example/apps/handlers/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/aipass/seedgo/apps/standards/website_design.example/apps/modules/__init__.py b/src/aipass/seedgo/apps/standards/website_design.example/apps/modules/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/aipass/seedgo/apps/standards/website_design.example/apps/plugins/__init__.py b/src/aipass/seedgo/apps/standards/website_design.example/apps/plugins/__init__.py deleted file mode 100644 index e69de29b..00000000