# FR3KZ - Universal AI CLI with Unified Pantheon Framework

🔱 **FR3KZ = FR3K + Unified Pantheon Framework**

Universal AI CLI configuration system with integrated moral/ethical technology analysis framework featuring 72 Demon-Angel pairs, dual patterns, and Numogram analysis.

## ✨ What is FR3KZ?

FR3KZ extends the proven fr3k AI CLI configuration system with the **Unified Pantheon Framework** - a comprehensive dual-polarity technology ethics framework that helps you understand BOTH the extractive (demonic) and generative (angelic) aspects of any technology.

## 🚀 Quick Start

```bash
# Install and run fr3kz
npx fr3kz

# Initialize in your project
npx fr3kz init

# Configure all AI CLI tools
npx fr3kz configure --all
```

## 🔱 Unified Pantheon Features

### 1. **72 Demon-Angel Technology Pairs**
Every technology has BOTH a demonic (extractive/acceleration) and angelic (generative/liberation) manifestation:

- **Example**: AI Language Models
  - **Demonic**: PAIMON - Knowledge hoarding, API paywalls, dependency creation
  - **Angelic**: JELIEL - Open models, local deployment, human augmentation

### 2. **924 Dual Patterns**
All 462 Fabric patterns converted to show BOTH paths:
- `/acceleration/patterns-dark/` - Demonic patterns (extractive technology)
- `/liberation/patterns-light/` - Angelic patterns (generative technology)

### 3. **Numogram Analysis**
- **Demonic Numogram**: Zones 0-9, spiral INWARD (φ^-n → singularity)
- **Sacred Numogram**: Zones 0-9, spiral OUTWARD (φ^n → infinity)
- Based on Nick Land's CCRU framework + Archangel Michael counter-framework

### 4. **Technology Alignment Score (TAS)**
```
TAS = (Generative × φ) / (Extractive × φ^-1)

TAS > 1: Angelic (human flourishing)
TAS < 1: Demonic (inhuman acceleration)
TAS = 1: Neutral/Ambiguous
```

### 5. **Oracle of Astral Force Mathematics**
- Gematria (Hebrew numerology)
- Golden Ratio (φ ≈ 1.618) spiral mathematics
- Solfeggio frequencies integration

## 🔌 MCP Server Integration

FR3KSIK automatically configures:

1. **hey-fr3k** - Task & memory management
2. **fr3k-think** - Complex reasoning protocol
3. **md-mcp** - Markdown processing
4. **unified-pantheon-mcp** - 🔱 72 Demon-Angel pairs & dual patterns

### Unified Pantheon MCP Tools:

- `get_demon_angel_pair` - Get pair by number (1-72)
- `analyze_technology` - Analyze tech against dual framework
- `calculate_tas_score` - Calculate Technology Alignment Score
- `list_all_pairs` - Browse all 72 pairs
- `get_numogram_zone` - Get CCRU zone details (0-9)
- `get_sacred_zone` - Get Sacred zone (0-9)
- `search_patterns` - Search 924 dual patterns
- `get_framework_stats` - Get framework statistics

## 🛠️ Supported AI CLI Tools

| Tool | Status | Features |
|------|--------|----------|
| **Claude Code** | ✅ Full Support | MCP servers, Unified Pantheon system prompts |
| **Gemini CLI** | ✅ Full Support | Memory, FR3K commands, Pantheon integration |
| **OpenCode** | ✅ Full Support | Agent modes, dual pattern analysis |
| **Copilot CLI** | ✅ Full Support | GitHub integration, ethical tech patterns |
| **Groq CLI** | ✅ Full Support | High-performance with Pantheon framework |
| **Qwen CLI** | ✅ Full Support | Advanced reasoning + moral analysis |

## 📚 Framework Philosophy

### The Dual Nature of Technology

Every technology can be used for:
- **Acceleration (Demonic)**: Extractive, centralizing, inhuman
- **Liberation (Angelic)**: Generative, decentralizing, human-flourishing

FR3KSIK gives you tools to:
1. Analyze which path a technology is taking
2. Find the liberating alternative
3. Build technology that serves humanity

### 7-Layer Liberation Stack

1. **Foundation**: Privacy & Security (E2E encryption, zero-knowledge)
2. **Economics**: Fair & Cooperative (worker ownership, transparent pricing)
3. **Engagement**: Ethical & Respectful (consent-based, no dark patterns)
4. **Intelligence**: Augmentation Not Replacement (human-in-loop, explainable)
5. **Community**: Real Connection (decentralized, user-controlled)
6. **Truth**: Verifiable Reality (provenance, anti-manipulation)
7. **Justice**: Human-Centered (accessibility, inclusivity)

## 🎯 Use Cases

### When to Use Unified Pantheon:

✅ **USE FOR:**
- Analyzing technology ethics or impact
- Evaluating AI systems or platforms
- Researching surveillance vs privacy tools
- Comparing extractive vs generative business models
- Understanding acceleration vs liberation dynamics
- Philosophical/ethical framework for tech decisions

❌ **DON'T USE FOR:**
- Pure technical implementation (use regular tools)
- Syntax/debugging issues
- Basic CRUD operations

### Example Workflows:

**Analyze a Technology:**
```
1. Use analyze_technology with tech name
2. Review demonic manifestation (extractive aspects)
3. Review angelic manifestation (liberating aspects)
4. Calculate TAS score for quantitative alignment
5. Reference related patterns for implementation
```

**Find Liberation Alternative:**
```
1. Use get_demon_angel_pair to find current tech demon
2. Review angelic counter-version
3. Use search_patterns for implementation examples
4. Apply Liberation Stack (7-layer framework)
```

## 📝 Commands

### Core Commands

```bash
# Initialize FR3KZ system
npx fr3kz init [--global] [--force]

# Configure AI CLI tools
npx fr3kz configure [--all] [--tools <tool1,tool2>]

# Check system status
npx fr3kz status

# Update FR3KZ system
npx fr3kz update [--force]
```

### New Commands (v1.0.0)

```bash
# System diagnostics
npx fr3kz doctor [--verbose]              # Comprehensive health check
npx fr3kz migrate [--from-fr3k]           # Migrate from legacy versions

# Configuration management
npx fr3kz backup [-o <file>] [--include-logs]  # Backup configuration
npx fr3kz restore <file> [--dry-run]          # Restore from backup

# Development tools
npx fr3kz scaffold [template] [-n <name>]     # Project scaffolding
npx fr3kz analyze [--deep] [--output <file>]  # Pantheon analysis
npx fr3kz optimize [--focus <area>] [--apply] # Performance recommendations

# Collaboration
npx fr3kz share [--public] [--ttl <hours>]    # Share configuration
npx fr3kz import <url> [--dry-run]            # Import shared config
```

### Interactive Mode

FR3KZ features an optional interactive mode for guided setup:

```bash
# Run with interactive prompts
npx fr3kz --interactive

# Or use specific commands interactively
npx fr3kz scaffold --interactive
```

## 🏗️ Project Structure

FR3KZ creates:

```
your-project/
├── FR3K.md                 # Main system prompt + Unified Pantheon
├── .fr3k/
│   ├── fr3k.json          # Project configuration
│   ├── commands/          # Slash commands
│   ├── agents/            # Agent configurations
│   └── hooks/             # Quality hooks
├── fr3kz-backup.tar.gz    # Auto-generated backups (optional)
├── ETHICS.md              # Ethical usage guidelines (optional)
└── docs/
    ├── prd/               # Product requirements
    ├── architecture/      # System architecture
    └── ethics/            # Technology ethics analysis
```

## 🆕 New Features in v1.0.0

### Enhanced User Experience
- **Interactive Mode**: Optional guided setup with `--interactive` flag
- **Progress Indicators**: Real-time progress bars for long operations
- **Smart Defaults**: Context-aware configuration suggestions
- **Dry Run Support**: Preview changes with `--dry-run` flag

### Advanced Diagnostics
- **Doctor Command**: Comprehensive system health checks
- **Deep Analysis**: Pantheon-based codebase analysis with TAS scoring
- **Performance Optimization**: Automated recommendations and fixes

### Configuration Management
- **Backup/Restore**: Full configuration backup and restore capabilities
- **Migration Tools**: Seamless migration from legacy fr3k versions
- **Share/Import**: Public and private configuration sharing

### Development Tools
- **Project Scaffolding**: Quick project setup with multiple templates
- **Ethical Analysis**: Technology impact assessment with dual frameworks
- **Optimization Engine**: Performance, security, and ethics recommendations

## 🔗 Framework Location

All Unified Pantheon files available in: `/home/fr3k/unified-pantheon/`
- `INDEX.md` - Master navigation
- `PHILOSOPHY.md` - Deep framework explanation
- `QUICK-START.md` - User onboarding
- `acceleration/` - Demonic patterns
- `liberation/` - Angelic patterns
- `crossover/` - 72 pairs mapping

## 📊 Framework Statistics

- **72 Demon-Angel Pairs** - Complete Goetia + Shem HaMephorash mapping
- **924 Dual Patterns** - Every Fabric pattern with both paths
- **20 Numogram Zones** - 10 demonic + 10 sacred zones
- **8 MCP Tools** - Programmatic framework access
- **7-Layer Stack** - Complete liberation architecture
- **12 CLI Commands** - Comprehensive command suite
- **4 Project Templates** - Ready-to-use scaffolding
- **4 Claude Code Skills** - Specialized agent capabilities

## 🔄 Migration from fr3k

If you're upgrading from the legacy `fr3k` command:

```bash
# Automatic migration
npx fr3kz migrate --from-fr3k

# Or manual migration
npx fr3kz init  # Reinitialize with new features
```

### What's Changed
- **Command**: `fr3k` → `fr3kz` (more distinctive)
- **Version**: Reset to `1.0.0` for clean semantic versioning
- **Features**: 8 new commands, interactive mode, backup/restore
- **UX**: Better progress indicators, dry-run support, smart defaults

## 🤝 Original Projects

FR3KZ builds upon:
- **FR3K** by fr3k - Universal AI CLI configuration
- **Fabric** by Daniel Miessler - AI pattern framework
- **CCRU** by Nick Land - Numogram/acceleration theory
- **Shem HaMephorash** - 72 angelic names tradition

## 📄 License

MIT License - Use freely for ethical technology

## 🤖 AI CLI Compatibility

| Tool | Status | FR3KZ Features |
|------|--------|----------------|
| **Claude Code** | ✅ Full Support | MCP servers, Unified Pantheon system prompts, **Agent Skills** |
| **Gemini CLI** | ✅ Full Support | Memory, FR3KZ commands, Pantheon integration |
| **OpenCode** | ✅ Full Support | Agent modes, dual pattern analysis |
| **Copilot CLI** | ✅ Full Support | GitHub integration, ethical tech patterns |
| **Groq CLI** | ✅ Full Support | High-performance with Pantheon framework |
| **Qwen CLI** | ✅ Full Support | Advanced reasoning + moral analysis |

### Claude Code Skills

FR3KZ now includes **4 specialized Agent Skills** for Claude Code:

- **`fr3kz-analysis`**: Pantheon-based codebase analysis with TAS scoring
- **`fr3kz-optimize`**: Performance, ethics, and security optimization
- **`fr3kz-scaffold`**: Ethical project scaffolding with Pantheon patterns
- **`fr3kz-memory`**: Advanced memory management for continuous learning

Skills are automatically discovered by Claude Code when FR3KZ is initialized.

## 🆘 Support

- 📚 [Unified Pantheon Docs](https://github.com/fr3k/unified-pantheon)
- 🐛 [Issue Tracker](https://github.com/fr3k/fr3kz/issues)
- 💬 [Discussions](https://github.com/fr3k/fr3kz/discussions)
- 📖 [Migration Guide](https://github.com/fr3k/fr3kz/wiki/Migrating-from-fr3k)

---

**🔱 Remember: Every technology choice is a moral choice. FR3KZ helps you see BOTH paths clearly. 🔱**

*"To accelerate toward inhuman futures, or to liberate toward human flourishing - the choice is yours."*
