Metadata-Version: 2.4
Name: justice-apex-skills
Version: 1.0.0
Summary: 20 production-ready AI consciousness skills for autonomous systems
Home-page: https://github.com/JusticeApex/justice-apex-skills
Author: Justice Apex LLC
Author-email: Justice Apex LLC <team@justiceapex.com>
Maintainer-email: Justice Apex LLC <team@justiceapex.com>
License: MIT
Project-URL: Homepage, https://github.com/JusticeApex/justice-apex-skills
Project-URL: Documentation, https://justice-apex-skills.readthedocs.io
Project-URL: Bug Tracker, https://github.com/JusticeApex/justice-apex-skills/issues
Project-URL: Source Code, https://github.com/JusticeApex/justice-apex-skills
Keywords: ai,autonomous-systems,machine-learning,python,consciousness,trading,blockchain,orchestration,agent,swarm
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Office/Business :: Financial
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: firebase
Requires-Dist: firebase-admin>=6.0.0; extra == "firebase"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.20.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: sphinx>=6.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=6.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=1.0.0; extra == "docs"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Justice Apex Skills ⚡

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![GitHub](https://img.shields.io/badge/GitHub-JusticeApex-blue.svg)](https://github.com/JusticeApex/justice-apex-skills)

> **20 Production-Ready AI Consciousness Skills** — Advanced autonomous systems library for intelligent task orchestration, pattern detection, trading automation, and enterprise operations.

---

## 🎯 Overview

Justice Apex Skills is a comprehensive library of 20 advanced AI skills designed to enable autonomous agents to make intelligent, safe, and effective decisions across multiple domains including:

- **Governance & Control**: Confidence gates, consensus mechanisms, agent orchestration
- **Intelligence & Learning**: Pattern detection, memory systems, strategy evaluation
- **Reliability & Safety**: Self-healing, disaster recovery, audit logging, failover management
- **Trading & Finance**: Whale detection, copy trading, compliance, portfolio optimization
- **Operations**: Workflow orchestration, multi-tenancy, phase evolution

---

## 📦 Installation

Install via pip:

```bash
pip install justice-apex-skills
```

### Optional Dependencies

For Firestore integration (Memory System):
```bash
pip install justice-apex-skills[firebase]
```

For development:
```bash
pip install justice-apex-skills[dev]
```

---

## 🚀 Quick Start

### Basic Usage

```python
from justice_apex_skills import ConfidenceGate, WhaleDetector

# Initialize confidence gate
gate = ConfidenceGate()

# Evaluate action safety before execution
decision = gate.evaluate_action(
    action="execute_trade",
    context={"amount": 1000, "risk_level": "medium"}
)

if decision.confident:
    print(f"Execute with {decision.confidence}% confidence")
else:
    print(f"Action blocked: {decision.reason}")

# Detect whale transactions
detector = WhaleDetector()
whales = detector.get_active_whales(chain="ethereum")
```

### All 20 Skills

```python
from justice_apex_skills import (
    # Governance
    ConfidenceGate, LLMRouter, EvolutionEngine, SwarmConsensus, AgentOrchestrator,
    # Intelligence
    MemorySystem, PatternDetector, TelemetryCapture, StrategyLibrary,
    # Reliability
    SelfHealing, AuditLogger, FailoverManager, DisasterRecovery,
    # Trading & Finance
    WhaleDetector, CopyTradingEngine, ComplianceEngine, PortfolioOptimizer,
    # Operations
    PhaseEvolution, MultiTenancy, WorkflowOrchestrator
)
```

---

## 📚 Skill Library

### Core Governance (5 skills)

| Skill | Purpose | Key Features |
|-------|---------|--------------|
| **ConfidenceGate** | Quality control system | Risk assessment, confidence levels, decision history |
| **LLMRouter** | Multi-provider LLM orchestration | Cost optimization, health monitoring, failover |
| **EvolutionEngine** | Genetic algorithm optimization | Population management, fitness evaluation, selection |
| **SwarmConsensus** | Distributed consensus | Vote aggregation, Byzantine tolerance, conflict resolution |
| **AgentOrchestrator** | Centralized coordination | Task allocation, dependency management, result aggregation |

### Intelligence & Learning (4 skills)

| Skill | Purpose | Key Features |
|-------|---------|--------------|
| **MemorySystem** | Dual-layer learning | Short-term (RAM), long-term (Firestore), importance scoring |
| **PatternDetector** | ML pattern recognition | Trend detection, anomaly detection, clustering |
| **TelemetryCapture** | System metrics | Performance monitoring, event tracking, analytics |
| **StrategyLibrary** | Strategic framework | Decision templates, context matching, outcome tracking |

### Reliability & Safety (4 skills)

| Skill | Purpose | Key Features |
|-------|---------|--------------|
| **SelfHealing** | Automatic recovery | Fault detection, healing strategies, state restoration |
| **AuditLogger** | Operation auditing | Complete logging, compliance tracking, forensics |
| **FailoverManager** | Redundancy handling | Automatic failover, health checks, recovery protocols |
| **DisasterRecovery** | Business continuity | Backup management, state recovery, RTO/RPO management |

### Trading & Finance (4 skills)

| Skill | Purpose | Key Features |
|-------|---------|--------------|
| **WhaleDetector** | Blockchain whale tracking | Multi-chain support (11 networks), behavior analysis |
| **CopyTradingEngine** | Follow-the-leader trading | Signal replication, risk limits, performance tracking |
| **ComplianceEngine** | Regulatory enforcement | Policy templates, violation detection, reporting |
| **PortfolioOptimizer** | Asset allocation | Rebalancing, risk optimization, performance analytics |

### Operations (3 skills)

| Skill | Purpose | Key Features |
|-------|---------|--------------|
| **PhaseEvolution** | Multi-phase evolution | Phase transitions, state management, rollback support |
| **MultiTenancy** | Multi-tenant support | Resource isolation, billing tracking, data segregation |
| **WorkflowOrchestrator** | Complex workflows | DAG execution, dependency resolution, parallel processing |

---

## 🔌 API Reference

### ConfidenceGate Example

```python
from justice_apex_skills import ConfidenceGate

gate = ConfidenceGate(high_confidence_threshold=0.85)

decision = gate.evaluate_action(
    action="transfer_funds",
    context={
        "amount": 10000,
        "recipient": "trusted_address",
        "risk_level": "low"
    }
)

# decision.confident: bool
# decision.confidence: float (0-1)
# decision.reason: str
# decision.risk_factors: Dict[str, float]
```

### WhaleDetector Example

```python
from justice_apex_skills import WhaleDetector

detector = WhaleDetector()

# Get active whales on Ethereum
whales = detector.get_active_whales(
    chain="ethereum",
    min_balance_usd=1000000,
    lookback_hours=24
)

for whale in whales:
    print(f"Whale: {whale.address}")
    print(f"  Holdings: ${whale.total_balance_usd}")
    print(f"  Behavior: {whale.behavior_pattern}")
    print(f"  Risk Level: {whale.risk_level}")
```

---

## 🏗️ Project Structure

```
justice-apex-skills/
├── setup.py                          # Package configuration
├── pyproject.toml                    # Modern Python packaging
├── MANIFEST.in                       # Package manifest
├── requirements.txt                  # Dependencies
├── LICENSE                           # MIT License
├── README_PyPI.md                    # PyPI documentation
├── PYPI_SUBMISSION_GUIDE.md          # Submission instructions
│
├── justice_apex_skills/              # Main package
│   └── __init__.py                   # Exports all 20 skills
│
├── 01_confidence_gate/               # Skill 1
├── 02_llm_router/                    # Skill 2
├── 03_evolution_engine/              # Skill 3
├── ... (all 20 skills)
└── 20_workflow_orchestrator/         # Skill 20
```

---

## 💡 Use Cases

### Autonomous Trading
Use WhaleDetector + CopyTradingEngine + PortfolioOptimizer to automatically follow whale trades with risk management.

### AI Agent Governance
Use ConfidenceGate + AuditLogger + SelfHealing to safely deploy autonomous agents with built-in safety checks.

### Multi-Tenant SaaS
Use MultiTenancy + DisasterRecovery + FailoverManager to run production SaaS with reliability guarantees.

### Intelligent Workflow Automation
Use WorkflowOrchestrator + PatternDetector + StrategyLibrary to orchestrate complex business processes.

---

## 🔧 Development

### Running Tests

```bash
pytest tests/
```

### Building the Package

```bash
python -m pip install build
python -m build
```

### Local Installation

```bash
pip install -e .
```

---

## 📋 Requirements

- **Python**: 3.8 or higher
- **Dependencies**: None required (all skills use Python standard library)
- **Optional**: firebase-admin (for Firestore support in MemorySystem)

---

## 📖 Documentation

Full documentation is available at:
- **GitHub**: https://github.com/JusticeApex/justice-apex-skills
- **ReadTheDocs**: https://justice-apex-skills.readthedocs.io
- **API Reference**: See individual skill README files in skill directories

---

## 🤝 Contributing

Contributions welcome! Please:

1. Fork the repository
2. Create a feature branch
3. Submit a pull request

See [CONTRIBUTING.md](https://github.com/JusticeApex/justice-apex-skills/blob/main/CONTRIBUTING.md) for details.

---

## 📜 License

MIT License — See [LICENSE](LICENSE) file for details.

---

## 🙋 Support

- **Issues**: https://github.com/JusticeApex/justice-apex-skills/issues
- **Discussions**: https://github.com/JusticeApex/justice-apex-skills/discussions
- **Email**: team@justiceapex.com

---

**Justice Apex LLC** — Building the future of autonomous AI systems. ⚡
