Tool

capture_concept

Concepts are source controlled — the repository's permanent memory. When something costs hours to learn, capture it before moving on. Later sessions get it handed to them automatically when they touch the files it applies to, and it is fact-checked against its own evidence so it cannot quietly go stale.

You say to your agent “capture what we just learned, so the next session doesn’t relearn it” — this is what it sends. The same operation is a shell command, which is the form you script against.

Your agent calls — mcp

capture_concept name="WebsiteCommandsMustBeRunBeforeShipping" category="rule" invariant="A command shown on the website ships only after being run verbatim against the current rql binary." relevance="src/cloud/website/**" isUniversal=false

You call — cli

rql concept add WebsiteCommandsMustBeRunBeforeShipping rule \ "A command shown on the website ships only after being run verbatim against the current rql binary." \ --tags "website,docs,cli,verification" --relevance "src/cloud/website/**" --subcategory website --contextual

What comes back — the same on both surfaces

Captured concept: concept:///rule/website/WebsiteCommandsMustBeRunBeforeShipping.md Path: .repoql/concepts/rule/website/WebsiteCommandsMustBeRunBeforeShipping.md

That concept is real: it was captured during the sweep that built this page, after three shipped commands turned out to have drifted from the binary. It now lives in the repository — markdown, committed with the code — and from here on, anyone who touches a file under src/cloud/website/, human or agent, is handed it. --why, --example, and --verification add the mechanism, a case that makes it click, and the evidence that keeps it honest.

Parameters

ParameterWhat it does
namerequiredA short CamelCase name. It is the identifier.
categoryrequiredwisdom, rule, or knowledge.
invariantrequiredThe idea, in one short sentence. If you need “and”, it is two concepts.
relevancerequiredURI globs. The concept surfaces when someone touches a matching file.
isUniversalrequiredWhether it also loads into the always-on index every agent carries. Earn it: only if the concept can be violated outside its relevance globs.
why · example · depthoptionalMechanism and stakes, a case that makes it click, and the distinctions and trade-offs behind it.
verification · ttlDaysoptionalGlobs or URLs that fact-check the claim, and how long that evidence stays trusted.

The three categories

CategoryWhat belongs there
wisdomTimeless ideas. Verification optional — do not tie them too tightly to the task that revealed them.
ruleInvariants and guardrails future work should follow. Verification encouraged.
knowledgeContext that improves decisions — architecture facts, file maps. Verification required, so it stays true.

What does not belong here

Anything specific to one person's workflow or one session's context — that is per-agent memory, not the repository's. And it is not a bug tracker: a first-party defect you can fix belongs in a fix. Third-party and platform constraints you cannot fix are exactly what it is for.

A worked example →

This page names what exists. The depth behind every name ships inside the binary at help:///: the bounds, the failure modes, how they compose. It answers to explore and read exactly like your code does. Install it, and your agent has the manual.