name: knowledge
description: Unified cross-store knowledge query. Searches MEMORY.md, Thoughtbox knowledge graph, git history, and assumption registry in parallel, returning results with provenance.
argument-hint:
user-invocable: true
allowed-tools: Read, Glob, Grep, Bash, ToolSearch
Search all knowledge stores for: $ARGUMENTS
Workflow
Phase 1: Parallel Search (Observe)
Execute all searches in parallel:
- MEMORY.md: Search the auto memory file at
.Codex/projects/*/memory/MEMORY.mdfor the query terms using Grep - Thoughtbox Knowledge Graph: Use ToolSearch to load
thoughtbox_execute, then search entities and observations matching the query viatb.knowledge.listEntities({ name_pattern: "..." })andtb.knowledge.queryGraph(...) - Git History: Run
git log --all --oneline --grep="$ARGUMENTS" -20for commit history - Assumption Registry: Search
.assumptions/*.jsonlfor matching assumption records using Grep - DGM Patterns: Search
.dgm/fitness.jsonfor patterns matching the query using Grep - Session Handoffs: Search
.sessions/handoff-*.jsonfor relevant context using Grep
Phase 2: Collate and Rank (Orient)
For each result found:
- Note the source store (provenance)
- Note the freshness (when was this last updated/verified)
- Note the relevance (how closely does it match the query)
- Check for cross-references (does this result reference other stores)
Phase 3: Present Results (Act)
Present results grouped by relevance, with provenance:
## Knowledge Query: "{query}"
### High Relevance
- [MEMORY.md] {finding} (line {N}, updated {date})
- [Thoughtbox] Entity: {name} — {observation} (created {date})
### Medium Relevance
- [Git] {commit-hash}: {message} ({date})
### Low Relevance
- [Assumptions] {assumption} (confidence: {N}%, last verified: {date})
### Cross-References
- Thoughtbox entity "{name}" relates to git commit {hash}
### Gaps
- No results found in: {store1}, {store2}
- Consider adding knowledge about "{query}" to {suggested_store}
Notes
- If a store doesn't exist yet (e.g.,
.dgm/fitness.jsonnot created), skip it silently - If Thoughtbox MCP tools aren't available, skip the knowledge graph search
- Always show which stores were searched and which returned nothing — gaps are informative
- If the query is broad, suggest more specific sub-queries