CouchDB Investigation
Use this skill when the user asks to answer a question that mixes CouchDB data with code in the current repository.
Workflow
- Check available profiles with
profile_activeandprofile_list. Stop if no active profile is configured. - Ask
recipe_suggestwith the user's original request. Reuse matching recipes as hints, not as proof. - Inspect relevant repository code with normal Codex file/search tools before querying CouchDB when the request mentions encoding, decoding, ID derivation, address derivation, or frontend/backend helper logic.
- Use targeted read-only CouchDB tools:
- Prefer
doc_head_or_existswhen checking likely document IDs. - Use
doc_getfor known documents. - Use
mango_findfor selectors. - Use
view_queryfor known design views. - Use
raw_getonly for CouchDB-relative endpoints that are not covered by the structured tools.
- Prefer
- Keep result limits conservative. Increase a limit only when the user's question requires it.
- Cross-reference database fields with the code path that produces or decodes them. State which parts came from code and which came from CouchDB.
- If the investigation produces a reusable pattern, call
recipe_savewith only workflow metadata: databases, selectors or view names in prose, code anchors, and steps. Never store returned user records, secrets, or payload bodies as recipe memory.
Safety Boundaries
- Do not perform writes, deletes, compaction, replication, or admin actions.
- Do not paste credentials into prompts, recipes, command output, or files.
- Treat saved recipes as suggestions. Always re-read live CouchDB data for the actual answer.
- If a query result is truncated, say so and either answer from the available subset or run a narrower query.
Output Shape
For user-facing answers, include:
- Short answer.
- Evidence from CouchDB records, with database/document identifiers where useful.
- Code references used to derive or decode values.
- Any limits, truncation, or uncertainty.