diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index e69de29b..38280cce 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -0,0 +1,34 @@ +# AIPass Framework + +Orchestration framework for autonomous AI agent ecosystems. + +## Structure + +- `src/aipass/` — All modules live here +- 10 modules: drone, seedgo, prax, cli, flow, ai_mail, api, trigger, spawn, devpulse +- 3-layer architecture per module: `apps/branch.py` (entry) + `apps/modules/` (logic) + `apps/handlers/` (impl) +- `AIPASS_REGISTRY.json` — Branch registry at repo root + +## Commands + +``` +drone systems # List registered modules/branches +drone @seedgo verify # Verify standards packs installed +drone @seedgo audit aipass # Run standards audit on repo +drone @module --help # Module help +``` + +## Conventions + +- All imports use pip namespace: `from aipass.{module}.apps.modules...` +- No hardcoded paths — use `Path(__file__).parents[N]` or registry lookups +- Each module has `.trinity/` (passport, local, observations) for identity/memory +- Each module has `.aipass/branch_system_prompt.md` for AI context injection +- Tests: `pytest` from repo root +- Branch prompt hook loads context from CWD's `.aipass/branch_system_prompt.md` + +## Dev Rules + +- Never bare imports (`from flow.apps...`) — always `from aipass.flow.apps...` +- Test in Docker for isolation verification (localhost:8080 code-server) +- `pyproject.toml` defines CLI entry points: `drone`, `seedgo` diff --git a/AIPASS_REGISTRY.json b/AIPASS_REGISTRY.json index fa6dfe04..c124468f 100644 --- a/AIPASS_REGISTRY.json +++ b/AIPASS_REGISTRY.json @@ -1,8 +1,8 @@ { "metadata": { "version": "1.0.0", - "last_updated": "2026-03-05", - "total_branches": 9 + "last_updated": "2026-03-06", + "total_branches": 10 }, "branches": [ { @@ -35,6 +35,16 @@ "created": "2026-03-05", "last_active": "2026-03-05" }, + { + "name": "DEVPULSE", + "path": "/home/aipass/aipass_business/AIPass/src/aipass/devpulse", + "profile": "library", + "description": "Orchestration hub for AIPass public repo. Manages dev notes, DPLANs, system status dashboards. The DEV_CENTRAL of AIPass.", + "email": "@devpulse", + "status": "active", + "created": "2026-03-06", + "last_active": "2026-03-06" + }, { "name": "DRONE", "path": "src/aipass/drone", diff --git a/CLAUDE.md b/CLAUDE.md index 527a0c13..813a078b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,44 @@ # AIPass Framework -Orchestration for autonomous AI agent ecosystems. +Orchestration framework for autonomous AI agent ecosystems. -- Uses `src/` layout. Run tests: `pytest`. Lint: `ruff check`. -- Trinity Pattern is the memory dependency. +## Structure + +- `src/aipass/` — All modules live here +- 10 modules: drone, seedgo, prax, cli, flow, ai_mail, api, trigger, spawn, devpulse +- 3-layer architecture per module: `apps/branch.py` (entry) + `apps/modules/` (logic) + `apps/handlers/` (impl) +- `AIPASS_REGISTRY.json` — Branch registry at repo root +- `.trinity/` per module — passport.json, local.json, observations.json (identity + memory) +- `.aipass/branch_system_prompt.md` per module — AI context injection + +## Commands + +``` +drone systems # List registered modules/branches +drone @seedgo verify # Verify standards packs installed +drone @seedgo audit aipass # Run standards audit on repo +drone @module --help # Module help +``` + +## Conventions + +- All imports use pip namespace: `from aipass.{module}.apps.modules...` +- No hardcoded paths — use `Path(__file__).parents[N]` or registry lookups +- Tests: `pytest` from repo root +- Lint: `ruff check` +- Trinity Pattern is the memory dependency +- `pyproject.toml` defines CLI entry points: `drone`, `seedgo` + +## Dev Rules + +- Never bare imports (`from flow.apps...`) — always `from aipass.flow.apps...` +- Test in Docker for isolation verification (localhost:8080 code-server) +- No paths referencing `/home/aipass/` — that's Dev-Pass, not AIPass + +## DevPulse + +DevPulse (`src/aipass/devpulse/`) is the orchestration hub for this repo. It coordinates work across modules, tracks status, and manages dev notes. It is to AIPass what DEV_CENTRAL is to Dev-Pass. + +## Current State + +All modules in "building" status — imports rewired from Dev-Pass to pip namespace, not fully tested yet. MPLAN-001 (in Dev-Pass dev_central) tracks all component status. diff --git a/src/aipass/devpulse/.claude/settings.local.json b/src/aipass/devpulse/.claude/settings.local.json new file mode 100644 index 00000000..0c90b038 --- /dev/null +++ b/src/aipass/devpulse/.claude/settings.local.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "allow": [], + "deny": [], + "ask": [] + }, + "enabledMcpjsonServers": [] +} diff --git a/src/aipass/devpulse/.gitignore b/src/aipass/devpulse/.gitignore new file mode 100644 index 00000000..9cf1dfc4 --- /dev/null +++ b/src/aipass/devpulse/.gitignore @@ -0,0 +1,14 @@ +__pycache__/ +*.pyc +*.pyo +.env +*.egg-info/ +.coverage +htmlcov/ +.pytest_cache/ +.mypy_cache/ +dist/ +build/ +*.log +*.tmp +*.swp diff --git a/src/aipass/devpulse/README.md b/src/aipass/devpulse/README.md new file mode 100644 index 00000000..8892f095 --- /dev/null +++ b/src/aipass/devpulse/README.md @@ -0,0 +1,51 @@ +# DEVPULSE + +**Purpose:** Orchestration hub for AIPass public repo. Manages dev notes, DPLANs, system status dashboards. The DEV_CENTRAL of AIPass. +**Module:** `aipass.devpulse` +**Created:** 2026-03-06 + +--- + +## Overview + +### What I Do + + +### How I Work +- **Entry Point:** `apps/devpulse.py` +- **Pattern:** Auto-discovers and routes to modules + +--- + +## Architecture + +``` +DEVPULSE/ +├── apps/ +│ ├── devpulse.py # Entry point +│ ├── modules/ # Business logic +│ ├── handlers/ # Implementation +│ └── plugins/ # Extensions +├── docs/ +├── tests/ +├── passport.json # Identity +├── local.json # Session history +├── observations.json # Collaboration patterns +└── README.md +``` + +--- + +## Commands + +*Configure after initialization* + +--- + +## Integration Points + +### Depends On + + +### Provides To + diff --git a/src/aipass/devpulse/apps/__init__.py b/src/aipass/devpulse/apps/__init__.py new file mode 100644 index 00000000..e78baf1e --- /dev/null +++ b/src/aipass/devpulse/apps/__init__.py @@ -0,0 +1 @@ +# DEVPULSE apps package diff --git a/src/aipass/devpulse/apps/branch.py b/src/aipass/devpulse/apps/branch.py new file mode 100644 index 00000000..7d6debc9 --- /dev/null +++ b/src/aipass/devpulse/apps/branch.py @@ -0,0 +1,86 @@ +""" +DEVPULSE 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"[DEVPULSE] 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"[DEVPULSE] 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"DEVPULSE - {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/devpulse/apps/handlers/__init__.py b/src/aipass/devpulse/apps/handlers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/aipass/devpulse/apps/modules/__init__.py b/src/aipass/devpulse/apps/modules/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/aipass/devpulse/apps/plugins/__init__.py b/src/aipass/devpulse/apps/plugins/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/aipass/devpulse/pytest.ini b/src/aipass/devpulse/pytest.ini new file mode 100644 index 00000000..c3f21db6 --- /dev/null +++ b/src/aipass/devpulse/pytest.ini @@ -0,0 +1,21 @@ +[pytest] +# Test discovery paths +testpaths = tests + +# Test file patterns +python_files = test_*.py +python_functions = test_* +python_classes = Test* + +# Command-line options (always applied) +addopts = + -v # Verbose output + --tb=short # Short traceback format + --strict-markers # Raise error on unknown markers + -ra # Show summary of all test outcomes + +# Test markers (for categorizing tests) +markers = + unit: Unit tests + integration: Integration tests + slow: Tests that take significant time diff --git a/src/aipass/devpulse/tests/__init__.py b/src/aipass/devpulse/tests/__init__.py new file mode 100644 index 00000000..077a3e19 --- /dev/null +++ b/src/aipass/devpulse/tests/__init__.py @@ -0,0 +1 @@ +# Tests package for devpulse diff --git a/src/aipass/devpulse/tests/conftest.py b/src/aipass/devpulse/tests/conftest.py new file mode 100644 index 00000000..a87088fd --- /dev/null +++ b/src/aipass/devpulse/tests/conftest.py @@ -0,0 +1,43 @@ +#!/home/aipass/.venv/bin/python3 + +# ===================AIPASS==================== +# META DATA HEADER +# Name: tests/conftest.py +# Date: 2025-11-08 +# Version: 1.0.0 +# Category: cortex/tests +# +# CHANGELOG (Max 5 entries): +# - v1.0.0 (2025-11-08): Initial implementation - Shared pytest fixtures +# +# CODE STANDARDS: +# - Error handling: Use error handler system (apps/handlers/error/) +# ============================================= + +"""Shared pytest fixtures for cortex tests""" +import pytest +import shutil +import tempfile +from pathlib import Path +from typing import Generator + + +@pytest.fixture +def temp_test_dir() -> Generator[Path, None, None]: + """Creates temporary directory for testing, cleans up after""" + test_dir = Path(tempfile.mkdtemp()) + yield test_dir + if test_dir.exists(): + shutil.rmtree(test_dir) + + +@pytest.fixture +def sample_test_data() -> dict: + """Provides sample test data + + Customize this fixture for your module's needs + """ + return { + "test_key": "test_value", + "sample_data": "example" + } diff --git a/src/aipass/trigger/trigger_json/trigger_data.json b/src/aipass/trigger/trigger_json/trigger_data.json index cdce2ad0..4ce22243 100644 --- a/src/aipass/trigger/trigger_json/trigger_data.json +++ b/src/aipass/trigger/trigger_json/trigger_data.json @@ -1,14 +1,14 @@ { "error_catchup": { - "last_scan_timestamp": "2026-03-05T22:08:52.170487", + "last_scan_timestamp": "2026-03-06T08:14:16.212679", "processed_hashes": [ "68dd0ab6", - "02d93909", "c7edc03b", + "4095ef97", "69de737b", - "ace01637", "541e0b9b", - "4095ef97" + "ace01637", + "02d93909" ], "max_hashes": 500, "max_lookback_hours": 24 diff --git a/testing b/testing new file mode 100644 index 00000000..e69de29b diff --git a/your b/your new file mode 100644 index 00000000..35241f92 --- /dev/null +++ b/your @@ -0,0 +1 @@ +export PATH="$HOME/.local/bin:$PATH" shell config file