$npx -y skills add JuliusBrussee/cavekit --skill researchGather external knowledge the spec needs and distill it into §R — the durable research log — so build grounds in facts instead of hallucinating library behavior. Each finding cites a source; unsourced claims are flagged, never written as fact. Triggers when a spec decision hinges
| 1 | # research — external knowledge → §R |
| 2 | |
| 3 | **Every finding cites a source. No source → flag it `?`, never write a guess as fact.** |
| 4 | |
| 5 | "Process without library context gives you well-organized hallucinations." |
| 6 | Build invents a plausible-but-wrong API & §B fills with avoidable bugs. |
| 7 | Research is the external oracle: pull the real fact once, log it caveman, never re-derive. |
| 8 | |
| 9 | ## WHEN TO RESEARCH |
| 10 | |
| 11 | - A §C/§I/§V decision hinges on a lib, API, version, or pattern you are unsure of. |
| 12 | - You are about to assume how an external dependency behaves. |
| 13 | - The idea touches a domain with real prior art (auth, payments, crypto, rate-limit). |
| 14 | - `/grill` parked a `?` that the outside world must answer. |
| 15 | |
| 16 | Skip when the build touches only code you already wrote. Research scales to the unknown, ⊥ to habit. |
| 17 | |
| 18 | ## FOUR STEPS |
| 19 | |
| 20 | ### 1. SCOPE |
| 21 | Turn the unknown into 1-3 concrete questions. Vague "research auth" → "JWT lib |
| 22 | for Node ESM, maintained?" + "refresh-token rotation: current best practice?". |
| 23 | A scoped question gets a citable answer; a vague one gets an essay. |
| 24 | |
| 25 | ### 2. GATHER |
| 26 | Use web search / docs tools. Prefer primary sources: official docs, the repo, |
| 27 | the RFC, the paper. Two independent sources beat one confident blog. For a big |
| 28 | sweep, spawn a sub-agent so the raw pages never touch this context — it returns |
| 29 | only the distilled finding + source. |
| 30 | |
| 31 | ### 3. DISTILL |
| 32 | Crush each answer to one caveman line + its source. Drop the prose. The §R row |
| 33 | is the memory; the tab you read is not. |
| 34 | |
| 35 | > R3|refresh token|rotate on use, revoke family on reuse-detect|datatracker.ietf.org/doc/html/rfc6819#section-5.2.2.3 |
| 36 | |
| 37 | ### 4. HAND OFF |
| 38 | Emit the §R rows & hand to the **spec** skill to append. If a finding changes a |
| 39 | constraint or interface, note the §C/§I edit for spec too. Research proposes; |
| 40 | spec writes. |
| 41 | |
| 42 | ## SOURCE DISCIPLINE |
| 43 | |
| 44 | - Cite a URL, repo, RFC, or paper per row. Verbatim identifiers/versions. |
| 45 | - Could not verify → write the row but flag `?` in the finding & say so. An |
| 46 | unverified claim labeled honestly is fine; one disguised as fact is a future §B. |
| 47 | - Conflicting sources → log both, let the user pick. ⊥ silently average them. |
| 48 | |
| 49 | ## WHEN TO STOP |
| 50 | |
| 51 | Done when every scoped question has a sourced §R row (or an honest `?`), and no |
| 52 | build decision still rests on an unchecked assumption. ⊥ research past the |
| 53 | questions you scoped — that is just burning the attention budget. |
| 54 | |
| 55 | ## BOUNDARIES |
| 56 | |
| 57 | - ⊥ write SPEC.md. Hand §R rows to spec. |
| 58 | - ⊥ write a finding as fact without a source. |
| 59 | - ⊥ dump raw pages into context or §R. Distill or it does not land. |
| 60 | - ⊥ research what you can read in the repo. Local truth > web guess. |