Swarm Orchestration Blueprint

This blueprint outlines the agent swarm orchestrator workflow using the eval tool and parallel() helper to execute docskurby and skill-xray pipelines.

Execution Pipeline

The execution is done via an OMP eval script (scripts/genius_loop.py). To ensure extreme scalability, fault-tolerance, and avoid prompt token limits, the orchestrator implements a file-based payload handoff paradigm.

Instead of passing large strings or artifacts inline, payloads are written to local:// URIs and passed as references. Agents natively read and write to these paths. Additionally, robust git tracking is performed at the end of each synthesis loop. This not only preserves a flawless changelog of perfection iterations but also triggers native Quartz timestamp updates based on git commits.

import subprocess
 
# Phase A: Deep Scrape
# Trigger docskurby on various targets, instructing them to return local:// file paths
scrapes = parallel([
    lambda: agent("Deep scrape memory://root skills. Write the full markdown report to local://scrape_skills.md and return ONLY the URI.", agent_type="task", role="docskurby"),
    lambda: agent(f"Web search best practices for {input}. Write the full markdown report to local://scrape_web.md and return ONLY the URI.", agent_type="task", role="docskurby"),
    lambda: agent("Deep scrape existing workspace SSOT files. Write the full markdown report to local://scrape_ssot.md and return ONLY the URI.", agent_type="task", role="docskurby")
])
 
# Phase B: Deep Audit
# The local:// URIs are passed to reviewers, instructing them to output to new local:// URIs
audits = parallel([
    lambda: agent(f"Audit the scrape at {scrapes[0]}. Extract Patterns, Anti-patterns, and Best Practices. Write to local://audit_skills.md and return ONLY the URI.", agent_type="reviewer"),
    lambda: agent(f"Audit the scrape at {scrapes[1]}. Extract Patterns, Anti-patterns, and Best Practices. Write to local://audit_web.md and return ONLY the URI.", agent_type="reviewer"),
    lambda: agent(f"Audit the scrape at {scrapes[2]}. Extract Patterns, Anti-patterns, and Best Practices. Write to local://audit_ssot.md and return ONLY the URI.", agent_type="reviewer")
])
 
# Phase C: Synthesize & Score
# Synthesize the audits into a single hyper-dense markdown cheat sheet
final_output = agent(
    f"Output MUST be a single hyper-dense markdown cheat sheet based on these audits: local://audit_skills.md, local://audit_web.md, local://audit_ssot.md.\n"
    "Score the previous iteration 1-10 on completeness and zero-fluff density. Only incorporate new patterns if they improve the score.",
    agent_type="task", 
    role="synthesizer"
)
 
# Phase D: Save Output & Git Tracking
perfected_path = f"content/06-Scrape-Vault/{input}-perfected.md"
write(f"local://06-Scrape-Vault/{input}-perfected.md", final_output)
 
# Commit the file to maintain a flawless changelog and trigger native Quartz Git history
subprocess.run(["git", "add", perfected_path], cwd="/home/dv/quartz-omp")
subprocess.run(["git", "commit", "-m", f"chore(loop): perfection iteration for {input}"], cwd="/home/dv/quartz-omp")