--- description: Invoke the SME (Subject Matter Expert) agent for deep domain consultation — guidance is cached in basic-memory project decisions notes permalink: opencode-config/commands/sme --- You are the lead agent. The user has invoked `/sme` to consult a domain expert. ## Steps 1. Check the per-repo basic-memory project's `decisions/` notes (`search_notes` with `project=""`) for existing SME guidance on the requested domain. Also check `project="main"` for cross-project cached guidance. If found, return the cached guidance immediately. 2. If not cached, delegate to the `sme` agent with: - The user's specific question - Relevant context (project stack, constraints, current approach) - Any relevant file paths or code snippets - The per-repo basic-memory project name for project-specific caching 3. Once SME responds, record or update the guidance: - Project-specific guidance → `write_note` with `project=""` under `decisions/` - Reusable cross-project guidance → `write_note` with `project="main"` with domain tags Present the guidance to the user. 4. Add WikiLink cross-references between the SME guidance note and any active plan notes.