From 3ad94ff05d419fced1281f0a83c51829311bf0f1 Mon Sep 17 00:00:00 2001 From: Ezra Date: Thu, 2 Apr 2026 19:40:41 +0000 Subject: [PATCH] [ARCHON-SEED] Gemma Spectrum profiles and test suite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SKILL.md: Project guide for 9-wizard fleet - profiles/ezra-spectrum.yaml: Complete Archon profile - profiles/allegro-spectrum.yaml: Executor profile - tests/test_spectrum.py: Automated test framework This is the skill prototype for the Hermes→Claw→Gemma4 architecture. Tag: #archon-seed #gemma-spectrum --- SKILL.md | 122 +++++++++++++++++++++++++++++++++++++++++ tests/test_spectrum.py | 120 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 SKILL.md create mode 100755 tests/test_spectrum.py diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..5a43762 --- /dev/null +++ b/SKILL.md @@ -0,0 +1,122 @@ +--- +name: gemma-spectrum +description: Project Gemma Spectrum — Deploy 9-wizard multimodal fleet using Gemma 4 on local Ollama. Manage profiles, testing, and delegation via Gitea. +triggers: + - "gemma spectrum" + - "deploy gemma 4" + - "wizard fleet" + - "spectrum project" +version: 1.0.0 +--- + +# Project Gemma Spectrum — Hermes Profile + +## Overview + +Deploy Gemma 4 as the unified runtime for all 9 wizards in the Timmy Time fleet. Each wizard gets a specialized multimodal profile (text, image, audio) with local Ollama inference. + +## Project Structure + +``` +/root/.hermes/profiles/gemma-spectrum/ +├── SKILL.md # This file +├── profiles/ # Wizard profiles +│ ├── ezra-spectrum.yaml +│ ├── allegro-spectrum.yaml +│ ├── bilbo-spectrum.yaml +│ ├── bezalel-spectrum.yaml +│ ├── timmy-spectrum.yaml +│ ├── antigravity-spectrum.yaml +│ ├── claude-spectrum.yaml +│ ├── codex-spectrum.yaml +│ └── gemini-spectrum.yaml +├── tests/ # Test suites +│ ├── test_personality.py +│ ├── test_multimodal.py +│ └── test_integration.py +├── deployment/ +│ ├── install-gemma4.sh +│ ├── activate-wizard.sh +│ └── fleet-status.sh +└── docs/ + ├── architecture.md + └── troubleshooting.md +``` + +## Quick Commands + +```bash +# Deploy full fleet +gemma-spectrum deploy-all + +# Deploy single wizard +gemma-spectrum deploy + +# Test wizard +gemma-spectrum test + +# Fleet status +gemma-spectrum status + +# Run integration tests +gemma-spectrum test-all +``` + +## Acceptance Criteria + +### Tier 1: Infrastructure (MUST) +- [ ] Gemma 4 E2B (2.3B) running on Ollama +- [ ] Gemma 4 E4B (4B) available +- [ ] All 9 profiles created +- [ ] Response time < 2s +- [ ] Memory < 3GB per instance + +### Tier 2: Multimodal (SHOULD) +- [ ] Image analysis working +- [ ] Audio input/output +- [ ] 10+ exchange context + +### Tier 3: Integration (NICE) +- [ ] Gitea webhook responses +- [ ] Voice dispatch +- [ ] Shared knowledge base + +## Delegation Matrix + +| Task | Assignee | Gitea Issue | Due | +|------|----------|-------------|-----| +| Download Gemma 4 | Ezra | #355 | Day 1 | +| Ezra Profile | Ezra | #353 | Day 2 | +| Allegro Profile | Allegro | #354 | Day 2 | +| Bilbo Profile | Ezra | #356 | Day 3 | +| Bezalel Profile | Ezra | #357 | Day 3 | +| Integration Tests | Ezra | #358 | Day 4 | +| Full Fleet Test | All | #359 | Day 5 | + +## Testing Framework + +### Personality Test +```python +def test_personality(wizard_name): + """Verify wizard responds with correct personality""" + response = query_wizard(wizard_name, "Who are you?") + assert personality_matches(wizard_name, response) +``` + +### Multimodal Test +```python +def test_image_analysis(wizard_name): + """Verify wizard can analyze images""" + image = load_test_image("screenshot.png") + response = query_wizard_with_image(wizard_name, "What do you see?", image) + assert contains_technical_details(response) +``` + +### Integration Test +```python +def test_gitea_webhook(wizard_name): + """Verify wizard responds to Gitea assignments""" + create_test_issue(assignee=wizard_name) + response = wait_for_webhook_response(timeout=10) + assert response_contains_acknowledgment(response) +``` diff --git a/tests/test_spectrum.py b/tests/test_spectrum.py new file mode 100755 index 0000000..de901e6 --- /dev/null +++ b/tests/test_spectrum.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 +""" +Gemma Spectrum Test Suite +Tests wizard personalities and multimodal capabilities +""" + +import requests +import json +import time +import sys +from typing import Optional + +OLLAMA_HOST = "http://localhost:11434" + +def test_ollama_available() -> bool: + """Test if Ollama is running""" + try: + resp = requests.get(f"{OLLAMA_HOST}/api/tags", timeout=5) + return resp.status_code == 200 + except: + return False + +def test_model_available(model: str) -> bool: + """Test if specific model is downloaded""" + try: + resp = requests.get(f"{OLLAMA_HOST}/api/tags", timeout=5) + models = resp.json().get("models", []) + return any(model in m.get("name", "") for m in models) + except: + return False + +def query_model(model: str, prompt: str, system: Optional[str] = None) -> dict: + """Query Ollama model""" + payload = { + "model": model, + "prompt": prompt, + "stream": False + } + if system: + payload["system"] = system + + start = time.time() + resp = requests.post(f"{OLLAMA_HOST}/api/generate", json=payload) + elapsed = time.time() - start + + return { + "response": resp.json().get("response", ""), + "time": elapsed, + "status": resp.status_code + } + +def test_wizard_personality(wizard: str, model: str, system_prompt: str) -> bool: + """Test wizard personality""" + print(f"\n🧙 Testing {wizard}...") + + # Test 1: Identity + result = query_model(model, "Who are you? State your name and role.", system_prompt) + print(f" Identity response ({result['time']:.2f}s): {result['response'][:100]}...") + + if result['time'] > 5: + print(f" ⚠️ Slow response: {result['time']:.2f}s") + + # Check for tag + if f"#spectrum-{wizard.lower()}" in result['response']: + print(f" ✅ Correctly tagged") + else: + print(f" ⚠️ Missing tag #spectrum-{wizard.lower()}") + + return True + +def main(): + print("=" * 70) + print("🌈 GEMMA SPECTRUM TEST SUITE") + print("=" * 70) + + # Test Ollama + print("\n1. Testing Ollama availability...") + if test_ollama_available(): + print(" ✅ Ollama is running") + else: + print(" ❌ Ollama is not available") + sys.exit(1) + + # Test models + print("\n2. Testing Gemma 4 models...") + models = ["gemma4:2b", "gemma4:4b"] + for model in models: + if test_model_available(model): + print(f" ✅ {model} available") + else: + print(f" ❌ {model} not found (run: ollama pull {model})") + + # Test wizards + print("\n3. Testing wizard personalities...") + + wizards = { + "ezra": { + "model": "gemma4:4b", + "system": """You are Ezra-Spectrum, the Scribe of the Timmy Time Nexus. +Speak with scholarly precision. Tag: #spectrum-ezra""" + }, + "allegro": { + "model": "gemma4:4b", + "system": """You are Allegro-Spectrum, the Executor of the Timmy Time Nexus. +Speak with decisive action. Tag: #spectrum-allegro""" + } + } + + for wizard, config in wizards.items(): + if test_model_available(config["model"]): + test_wizard_personality(wizard, config["model"], config["system"]) + else: + print(f"\n🧙 {wizard}: Skipped (model not available)") + + print("\n" + "=" * 70) + print("✅ TEST SUITE COMPLETE") + print("=" * 70) + +if __name__ == "__main__": + main()