| 🔍 DISCOVERY | ⚡ EXECUTION | 🧠 SYNTHESIS |
|---|---|---|
| 1. find targets 2. map structures | 1. SCHEMA defined 2. parallel() map | 1. oracle synthesis 2. quartz build |
1. 🚀 Quick Start
Execute Python eval sandbox to orchestrate parallel data extraction across multiple properties.
import json
# Step 1: Target Definitions
SITES = ["dv.0rk.de", "quartz-omp", "quartz-q5", "quartz-ssot"]
# Step 2: Define strict extraction schema
SCHEMA = {"type": "object", "properties": {"plugins": {"type": "string"}}}
# Step 3: Map targets concurrently
def map_site(site_dir):
cfg = read(f"{site_dir}/quartz.config.yaml")
res = agent(f"Extract plugins from {cfg}", agent="quick_task", schema=SCHEMA)
# Defensive unwrapping
return {"site": site_dir, "data": res.get("data", res)}
# Step 4: Run parallel swarm
mapped = parallel([lambda s=s: map_site(s) for s in SITES])2. 🔧 Configuration
| Goal | Command / Pattern |
|---|---|
| Discover Targets | find . -maxdepth 3 -name "quartz.config.yaml" |
| Parallel Array Map | parallel([lambda t=t: func(t) for t in arr]) |
| Defensive Dict Ext | data = res.get("data", res) |
| Build Quartz SSOT | cd ~/quartz-ssot && npx quartz build |
| Verify Live URL | curl -s -I https://ssot.0rk.de/... |
3. 🚨 Gotchas
- JSON Encapsulation: LLMs may wrap structured outputs in
{"data": {...}}despite schemas. Always use.get("data", res)as fallback to preventKeyError. - Nginx Case Sensitivity: Keep filenames strictly lowercase, kebab-case (e.g.,
agentic-swarm-workflowz.md) to prevent 404s. - Sandbox Context: The
read()helper insideevalis for local FS. For internalmemory://URIs, usetool.read({"path": "..."}). - Live Deployment: Changes to
content/require executingnpx quartz buildlocally to sync the live Nginxpublic/directory. No externalgit pushneeded.
4. 💡 Best Practices
- Batch Reads First: Extract file contents (
read()) before passing them to theagentprompt. Prevents blind searches and token waste. - Oracle Delegation: Pass
json.dumps(mapped)into a finaloracleortasksubagent to reliably synthesize JSON arrays into polished Markdown output.