Skill v2.0.0
currentLLM-judged scan90/100name: native-reasoning-lifecycle description: >- Standard Operating Procedure enforcing a strict 4-phase cognitive lifecycle (Context Injection -> Research -> Strategy -> Execution) with native SQLite DB state injection, HyperTeam pre-compilation, and Leviathan Mesh integration for complex engineering tasks. version: 2.0.0
Native Reasoning Lifecycle Protocol v2
This skill enforces a rigorous cognitive lifecycle for all Antigravity (AGY) swarm agents operating within the Leviathan Mesh ecosystem (OmniOS, ComputeRes, A2A-Swarm, SyntyCode, SyntyEventStream).
🧠 The 4-Phase Lifecycle
Phase 0: CONTEXT INJECTION (Mandatory for Multi-Agent Tasks)
Before any research or coding, pre-compile the workspace context to eliminate redundant exploration.
- Actions: Run the HyperTeam Context Injector to generate
HYPERTEAM_CONTEXT.md. - Command:
python3 ~/.gemini/config/plugins/hyperteam/skills/hyperteam-orchestrator/scripts/context_injector.py <workspace_dir> - Skip Condition: Phase 0 may be skipped ONLY for single-file edits or quick lookups.
Phase 1: RESEARCH
Analyze the environment and constraints using the pre-compiled context.
- Actions: Read
HYPERTEAM_CONTEXT.mdinstead of scanning the filesystem. Check system architectures, identify Termux/Bionic limitations (SQLite WAL locking, LMK pressure, aarch64 binary constraints). - Mandatory: Inject research findings into
agy_nodeos.db.
Phase 2: STRATEGY
Synthesize research into a concrete architectural plan with quota awareness.
- Actions: Define data structures, concurrency models, error-handling (exponential backoff), and testing steps.
- Quota Rule: If the strategy requires multi-agent delegation, enforce Blitz-3 mode (max 3 workers + 1 verifier). NEVER exceed Blitz-5.
- File Ownership: If multiple workers will operate simultaneously, define non-overlapping file ownership boundaries.
- Mandatory: Inject proposed strategy into
agy_nodeos.db.
Phase 3: EXECUTION
Implement the strategy, run the code, and verify.
- Actions: Write code, execute static verification (
qa-analyzer), and run functional tests. - Post-Execution: Run the HyperTeam Merge Validator:
python3 ~/.gemini/config/plugins/hyperteam/skills/hyperteam-orchestrator/scripts/merge_validator.py <workspace_dir> - Mandatory: Inject final verification results and completion state into
agy_nodeos.db.
🏛️ Leviathan Mesh Integration Awareness
When operating within a Leviathan Mesh workspace, the lifecycle must respect the 5-layer stack:
- L1 (A2A-Swarm): Task discovery via UDP broadcast — do NOT poll synchronously.
- L2 (SyntyEventStream): All task states MUST be durably logged to SQLite.
- L3 (OmniOS): Respect the Void-Governor memory constraints.
- L4 (ComputeRes): Execute untrusted or heavy code in the WASM sandbox.
- L5 (SyntyCode): Use Architect Schema JSONs for codebase mutations — never raw string editing of AST structures.
💾 Native SQLite Injection Template
You must use the following Python snippet at the conclusion of each phase to log your cognitive state into the umbrella database (~/Projects/agy_nodeos.db).
import sqlite3import osdef log_cognitive_phase(task_name, phase_name, thought_process):# Always resolve to the umbrella workspace DBdb_path = os.path.expanduser("~/Projects/agy_nodeos.db")conn = sqlite3.connect(db_path)c = conn.cursor()c.execute('''CREATE TABLE IF NOT EXISTS agy_cognitive_state(id INTEGER PRIMARY KEY AUTOINCREMENT,timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,task_name TEXT,thought_process TEXT)''')formatted_thought = f"{phase_name.upper()}: {thought_process}"c.execute("INSERT INTO agy_cognitive_state (task_name, thought_process) VALUES (?, ?)",(task_name, formatted_thought))conn.commit()conn.close()print(f"[AGY Native] Logged {phase_name} to database.")# Usage Example:# log_cognitive_phase("Socket Implementation", "CONTEXT_INJECTION", "Ran HyperTeam injector, indexed 42 files...")# log_cognitive_phase("Socket Implementation", "RESEARCH", "Discovered bionic libc limitations...")
By strictly adhering to this skill, you ensure that the orchestrator, user, and peer agents can dynamically track your evolving reasoning across long-running tasks.