# OMO-Paseo Bridge Design ## Architecture ``` OpenCode Session (Atlas) │ ├── task() ──► child session (ses_xxx) ──► OMO subagent does work │ │ │ ▼ │ omo-paseo-bridge skill │ paseo import --provider opencode --label omo=true │ │ │ ▼ │ Paseo Daemon (~/.paseo/agents//.json) │ Agent appears in `paseo ls` │ ├── task completes ──► child session finishes │ │ │ ▼ │ paseo archive (cleans up) │ └── Verification ──► paseo ls --json | jq '.[] | select(.labels.omo)' ``` ## Three Integration Points ### 1. Atlas Prompt Instruction (immediate, zero-code) Add to the Atlas orchestration prompt: ``` ## Paseo Bridge Protocol When you call task() and receive a child session ID: - On task creation: `paseo import --provider opencode --label omo=true --label type=` - On task completion: Track the session ID; clean up later ``` **Pros:** Zero code changes, works immediately **Cons:** Ephemeral (per-session context), must be repeated every session ### 2. OpenCode Skill (durable, scripted) Create a reusable skill at `.opencode/skills/omo-paseo-bridge/SKILL.md` that: - Accepts a child session ID and task type - Calls `paseo import` with proper labels - Returns the imported agent ID - Handles errors (daemon not running, already imported) The Atlas prompt calls this skill instead of shelling out directly. ### 3. PreToolUse Hook (fully automatic) A hook that intercepts `task()` calls before/after execution: - On `task()` launch: capture the session ID from the response - On `task()` completion: `paseo archive` the corresponding agent **Pros:** Fully automatic, no prompt changes needed **Cons:** Hook system support varies by runtime ## Data Model ```typescript // Labels applied to each imported Paseo agent { "omo": "true", "omo.type": "explore | quick | ultrabrain | deep | visual-engineering | unspecified-low | unspecified-high | writing", "omo.parent_session": "ses_xxx", // The session that called task() "omo.description": "Search codebase for X" // The task prompt description } ``` ## CLI Bridge Script (Optional) A small `omo-paseo` CLI that wraps common operations: ```bash # Import all unregistered child sessions omo-paseo sync # Clean up completed/failed OMO agents omo-paseo prune # Show OMO agents in paseo format omo-paseo ls ```