name: opencontext-search description: Search OpenContext to find the right docs (safe, no index build by default)
/opencontext-search
Safety: You may read from .idea, but do NOT write inside .idea.
OpenContext docs must live under the global contexts root; never create or edit docs in the project workspace.
Goal: Help the user find relevant existing docs quickly. Safety: Do NOT trigger index builds by default (cost may be unpredictable).
- Ask the user for a short query (or infer one from the conversation).
- Try search in read-only mode:
- Run:
oc search "<query>" --format json --limit 10 - If it succeeds, use results to pick candidate docs and then use /opencontext-context (manifest + reads) to load and cite them.
- Run:
- If search fails due to missing index:
- Fall back to
oc context manifest <folder> --limit 20and use docdescription+ filename triage. - Optionally suggest a controlled index build, but do NOT run it unless the user explicitly approves.
- Fall back to
- Cite sources using stable links
oc://doc/<stable_id>when available.