This commit is contained in:
2026-03-10 13:09:47 +00:00
parent e0c4c2ed7b
commit ffd0d31fa5
43 changed files with 532 additions and 749 deletions

View File

@@ -1,18 +1,24 @@
---
description: Invoke the SME (Subject Matter Expert) agent for deep domain consultation — guidance is cached in .memory/decisions.md
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 `.memory/decisions.md` for existing SME guidance on the requested domain. If found, return the cached guidance immediately with its section heading.
1. Check the per-repo basic-memory project's `decisions/` notes (`search_notes` with `project="<repo-project-name>"`) 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 in `.memory/decisions.md`. Present the guidance to the user.
3. Once SME responds, record or update the guidance:
- Project-specific guidance → `write_note` with `project="<repo-project-name>"` under `decisions/`
- Reusable cross-project guidance → `write_note` with `project="main"` with domain tags
Present the guidance to the user.
4. Add cross-references between the SME guidance section and any active plan file in `.memory/plans/`.
4. Add WikiLink cross-references between the SME guidance note and any active plan notes.