| name | ref-query |
| description | Structured, temporal lookup against a reference scope — "what do we know about Acme Corp as of today?", "which engagements are active and expiring in 90 days?", "list our competitors". Respects status (active over superseded), validity windows, and as_of freshness, and ALWAYS prints the as_of date so staleness is legible. Distinct from /recall, which searches cognitive insights. Company is the default scope. Read-only. |
| automation | manual |
| allowed-tools | ["Read","Bash","Glob","Grep"] |
| user-invocable | true |
| argument-hint | [scope=Company] <entity name | filter, e.g. 'engagements active expiring 90d' | 'competitors'> |
| metadata | {"version":"1.0","created":"2026-07-08T00:00:00.000Z","author":"Cornelius","changelog":["1.0: Initial version — deterministic frontmatter scan + fuzzy fallback with read-time interpretation (active>superseded, valid_until, as_of discount vs per-type SLA, always print as_of)"]} |
Ref Query
ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change — the top entry of metadata.changelog above — e.g. ref-query v1.0 — recent: initial version. Then proceed.
Answer a structured question about reference records with the temporal contract applied. This is not /recall — /recall searches the user's cognitive insights; ref-query reads the CRM/market source of truth and honours status/validity/as_of.
Read first: resources/layered-brains/COMPANY-BRAIN-SCHEMA.md → "The temporal model" (read-time interpretation + the per-type Freshness SLA). This skill enforces those rules.
State Dependencies
| Source | Location | Read | Write | Description |
|---|
| Company family | Brain/Company/{people,orgs,products,engagements,market}/*.md | ✓ | | Entity notes + frontmatter |
| Search wrapper | resources/local-brain-search/run_search.sh | ✓ | | Fuzzy "tell me about X" under a core,Company mount |
Process
Step 1 — Classify the question
Step 2 — Scan (deterministic filters)
Frontmatter is the query surface. Examples:
cd Brain/Company
grep -rlE */*.md | f; grep -qE && ;
f engagements/*.md; grep -qE && \
;