CLI reference
rlat is the command-line interface to a knowledge model.
Every subcommand below is wired and ships — this page is rebuilt
directly from the command parser.
Command map
rlat dispatches the following top-level commands. They
group into seven jobs: build a model, query it,
inspect it, keep it fresh, work the
insight / trust layer, drive memory and intent,
and share it.
| Command | Job | Needs an LLM key? |
|---|---|---|
install-encoder | one-time: stage the encoder cache | no |
build | build a knowledge model from text sources | no |
init-project | one-command project setup (build + primer) | no |
search | single-shot top-k retrieval over source + insight layers | no |
deep-search | multi-hop research loop returning a grounded answer | yes |
profile | corpus shape / bands / drift summary | no |
compare | cross-knowledge-model comparison (base band) | no |
summary | generate an extractive context primer | no |
skill-context | markdown context block for an Anthropic skill | no |
refresh | local-mode incremental delta-apply | no |
watch | live, debounced refresh loop | no |
sync | remote-mode incremental delta-apply | no |
freshness | remote-mode read-only drift check | no |
convert | change storage mode in place | no |
audit | read-only trust-contract audit of the insight layer | no |
trace | full provenance chain for an insight or source | no |
reverify | LLM re-judge of stale insights | yes |
grow | opt-in self-improvement pass: fill the archive's most-demanded, worst-covered gaps from its own telemetry | yes |
probe | idle-cycle self-probe of weak-zone queries | yes |
memory | per-user flat memory (17 subcommands — full table on Memory & sessions) | only verify |
intent | declare and resolve the live intent graph | only decompose (what-next uses one when present) |
expertise | build the expertise primer (memory + intent synthesis) | no |
lens | manage .lens perspective artefacts | no |
workspace | resolve / declare the workspace identity | no |
fabric | manage fabric:// aliases for hosted UDFs | no |
capture-env | auto-probe machine-readable environment attributes into the insight band | no |
capture-attribute | record one fact, constraint, or falsified belief about your world | no |
consolidate-insights | fold accumulated outcome signals into each insight's confidence | no |
A "yes" above means the CLI verb needs a key for unattended runs — not that the capability does. Every keyed loop also runs free in-session on your Claude subscription (API keys — the free path).
An insight is an earned, cited summary stored alongside
the raw source passages. rlat search retrieves over
both the source layer and the insight
layer; deep-search plus the insight layer
produce faithfully-grounded answers — every claim traces back to
the corpus. See the claim system page for the full
model.
rlat build
Build a knowledge model from one or more source paths.
rlat build <sources...> -o knowledge_model.rlat \
[--store-mode bundled|local|remote] \
[--remote-url-base URL] \
[--kind corpus|intent] \
[--source-root PATH] \
[--runtime auto|openvino|onnx|torch] \
[--min-chars N] [--max-chars N] \
[--batch-size N] \
[--ext EXT ...]
Examples
# Default: local mode — smallest .rlat, source stays on disk
rlat build ./docs ./src -o my-corpus.rlat
# Bundled — self-contained, ship anywhere
rlat build ./docs ./src -o my-corpus.rlat --store-mode bundled
# Remote — source pinned at canonical URLs
rlat build ./docs -o my-corpus.rlat \
--store-mode remote --remote-url-base https://example.com/corpus/v1
# Restrict to specific extensions (override the default text allowlist)
rlat build ./notebooks -o nb.rlat --ext .ipynb --ext .md
Flags
| Flag | Default | Effect |
|---|---|---|
<sources...> | (required) | One or more files or directories. Directories are walked recursively. |
-o, --output | (required) | Output .rlat path. |
--store-mode | local | How the model resolves source files at query time. See the Storage modes page. |
--remote-url-base | (none) | URL prefix joined with each relative source_file. Required when --store-mode remote. |
--kind | corpus | Knowledge-model kind tag (corpus or intent). |
--source-root | common ancestor of sources | Root for the source_file paths recorded in the registry. |
--runtime | auto | Encoder runtime. auto = OpenVINO on Intel CPUs, ONNX elsewhere; torch needs the [build] extra. |
--min-chars | 200 | Chunker minimum chunk size. |
--max-chars | 3200 | Chunker maximum chunk size. |
--batch-size | 32 | Encoder batch size. Smaller for tight RAM, larger for GPU throughput. |
--ext EXT | built-in allowlist | Override the file-extension allowlist. Repeatable; the leading dot is optional. |
What gets built
- Sources are walked recursively and sorted for cross-platform stability.
- Each file is decoded as UTF-8 (newlines normalised); non-UTF-8 files are skipped with a one-line summary.
- Each file is chunked: paragraph splits, then sentence splits, then hard splits at
--max-chars. Chunks below--min-charsmerge into neighbours. - Passages are encoded by
Alibaba-NLP/gte-modernbert-base(CLS-pooled, L2-normalised, 768d). - A FAISS HNSW index is built when there are more than 5,000 passages.
- With
--store-mode bundled, source files are zstd-framed and stored undersource/inside the ZIP. - The
.rlatis written atomically (temp file, then rename).
Exit codes
| Code | Meaning |
|---|---|
0 | Build succeeded. |
1 | Runtime error (no text files found, chunker produced no passages). |
2 | Usage error (missing <sources>). |
CPU encoding runs at ~80–150 passages/sec; a CUDA T4 runs
at ~1,500–2,500. For corpora over ~10K passages, the
rlat-build-on-kaggle skill walks through using a free
T4 GPU.
rlat init-project
One-command project setup. Auto-detects source directories in the
current working directory, builds a knowledge model with sensible
defaults, and (unless --no-primer) writes a context
primer to .claude/resonance-context.md.
cd my-project/
rlat init-project # auto-detect docs/, src/, README.md, etc.
rlat init-project -o custom.rlat # override the output path
rlat init-project --source ./notes --source ./code # explicit sources, skip auto-detect
rlat init-project --no-primer # skip .claude/resonance-context.md
It is equivalent to:
rlat build <detected-sources> -o <cwd>.rlat
rlat summary <cwd>.rlat -o .claude/resonance-context.md
Auto-detection looks for docs/, src/,
lib/, notebooks/, examples/
and top-level *.md / *.rst /
*.txt. If none exist, the command errors and asks you
to be explicit with --source rather than producing an
empty knowledge model.
rlat install-encoder
Pre-stage the gte-modernbert-base encoder cache. Most
users never run this directly — the first rlat build
triggers it automatically. Useful for offline-build environments
and CI.
rlat install-encoder # default pinned revision
rlat install-encoder --force # re-download and re-convert even if cached
rlat install-encoder --revision <sha> # pin to a different HuggingFace revision
The cache lives at
~/.cache/rlat/encoders/<revision>/. ONNX is
always exported; OpenVINO IR is exported additionally on Intel
CPUs.
rlat search
Top-k retrieval against a knowledge model. Single recipe — no
rerank flag, no hybrid mode, no cascade. Retrieval runs against the
base band. search retrieves over both the source layer
and the insight layer; every hit is labelled with the layer it came
from.
rlat search km.rlat "<query>" \
[--top-k N] \
[--format text|json|context] \
[--mode augment|knowledge|constrain] \
[--source-only] \
[--lens FILE] \
[--include-stale] \
[--source-root DIR] \
[--verified-only] \
[--strict-names] \
[-q | --quiet]
Examples
# Quick top-10 (default), human-readable
rlat search my-corpus.rlat "how does retrieval work"
# Synthesis-ready context block — pipe straight into your LLM call
rlat search my-corpus.rlat "auth flow" --format context --top-k 5
# JSON for scripts; suppress the stderr banner
rlat search my-corpus.rlat "..." --format json -q
# Only return hits whose source has not drifted since build
rlat search my-corpus.rlat "..." --verified-only
# Source passages only — bypass the insight layer
rlat search my-corpus.rlat "..." --source-only
# Apply a saved perspective
rlat search my-corpus.rlat "..." --lens ./team.lens
Flags
| Flag | Default | Effect |
|---|---|---|
--top-k | 10 | Number of hits to return. |
--format | text | text, json, or context (see below). |
--mode | augment | Grounding mode for the consumer LLM (--format context only). See grounding modes below. |
--source-only | off | Bypass the insight layer; return source passages only. |
--lens FILE | (none) | Path to a .lens file. Applies its trust weights to the ranking. |
--include-stale | off | Include insight rows whose cited source has drifted (verdict_state=stale). |
--source-root DIR | (recorded) | Override the recorded source_root (local mode only). |
--verified-only | off | Drop hits whose source has drifted or gone missing. |
--strict-names | off | (--format context only) Exit non-zero when a distinctive query token appears in no retrieved passage. |
-q, --quiet | off | Suppress the [search] banner on stderr. |
Output formats
text(default):score source_file:offset+length [drift_status] previewjson: a list of objects with all hit fields, includingtextandcontent_hash.context: passages concatenated up to a token budget, prefixed by a grounding-mode directive. Designed to be pasted or piped into a downstream LLM as primer context.
Grounding modes
--mode (with --format context) controls
how the consumer LLM should treat the retrieved passages.
The mode stamps a directive at the top of the output and pairs it
with a confidence gate that suppresses the body on weak retrieval.
| Mode | Behaviour | Use for |
|---|---|---|
augment (default) |
Passages are primary context blended with the LLM's training. The body is replaced by a "no confident evidence" marker on weak retrieval. Single-shot benchmark: 76.5% accuracy / 3.9% hallucination on Microsoft Fabric docs. | Broad documentation corpora where the LLM already has solid prior knowledge. |
constrain |
Passages are the only source of truth; the LLM is told to refuse when evidence is thin. No gate. Single-shot: 66.7% / 2.0% / 91.7% distractor refusal. | Fact extraction, compliance, regulatory, and audit work where wrong-but-confident is worse than no answer. |
knowledge |
Passages supplement training; lighter gate. Single-shot: 70.6% / 5.9%; under deep-search it ties augment at 0% hallucination. |
Partial-coverage corpora where the LLM knows the surrounding domain well. |
Full table + receipts: the hallucination bench.
Every hit carries a drift_status of
verified, drifted, or missing,
derived by re-hashing the slice against the hash recorded at build.
The fabric:// URL form
rlat search also accepts
fabric://<alias>[/<km>] as the
knowledge-model argument. The alias is resolved against the local
Fabric config (written by rlat fabric add); the
request is sent to a hosted Fabric UDF endpoint. All flags work
identically — formatting is client-side.
rlat search fabric://team # discovery: list KMs on this UDF
rlat search fabric://team/team-docs "..." # search a specific KM
rlat deep-search
This CLI verb calls Sonnet 4.6 through the Anthropic API for the
planner / refiner / synthesizer hops; each invocation costs
~$0.009–0.025. For interactive Claude Code use, the
deep-research skill runs the same loop natively in your
session with no extra cost — your Claude subscription covers the
LLM hops. Prefer the skill in nearly every Claude Code scenario;
this CLI verb is the right pick for non-Claude-Code agents, CI
pipelines, and batch jobs. See the
API keys page.
A multi-hop research loop: plan → search → refine → synthesize. It returns a faithfully-grounded answer plus an evidence union with anchors, in one call.
rlat deep-search km.rlat "<question>" \
[--max-hops N] # default 4
[--top-k K] # default 5 per hop
[--format text|json|markdown] # default text
[--source-root DIR]
[--strict-names] # non-zero exit on a name-aliasing refusal
What it does
- Plan — Sonnet generates an initial 6–15 word query from the question.
- Search —
rlatretrieves top-k passages for the current query. - Refine — Sonnet sees the question plus accumulated evidence and decides:
answer(final answer ready),search(next query), orgive_up(corpus does not cover the question). - Repeat until the refiner picks
answerormax_hopsis exhausted. - Name-check runs across the union of all hops' evidence; missing distinctive tokens trigger a refusal directive.
Benchmark
Microsoft Fabric corpus, 63 questions, Sonnet 4.6, relaxed rubric:
| Approach | Accuracy | Hallucination | Mean cost / q |
|---|---|---|---|
| LLM alone (no retrieval) | 56.9% | 19.6% | $0.002 |
Single-shot search --format context (augment) | 76.5% | 3.9% | $0.004 |
deep-search (4-hop, augment) | 92.2% | 2.0% | $0.010 |
deep-search --mode knowledge | 92.2% | 0.0% | $0.009 |
Full table + receipts: the hallucination bench.
rlat profile
Knowledge-model diagnostics — what is in the .rlat
without running a query. Reports the backbone, bands, store mode,
build config, ANN parameters, and a drift summary.
rlat profile km.rlat [--format text|json] [--source-root DIR] [--no-drift]
The drift walk re-hashes every passage and reads every distinct
source file. --no-drift returns immediately with
metadata only — useful for scripted dumps or sanity checks on huge
models. In JSON, the drift field carries an explicit
status tag (computed /
skipped) so consumers branch on the status rather than
sniffing for keys.
rlat compare
Cross-knowledge-model comparison. Uses the base band on both sides — the band every knowledge model shares, so the numbers are always directly comparable.
rlat compare a.rlat b.rlat [--format text|json] [--sample N]
| Metric | Meaning |
|---|---|
centroid_cosine | Cosine of the two corpora's mean vectors — a single thematic-alignment number. |
coverage_a_in_b | Mean max-cosine for a sample of A's rows against all of B: "how well are A's passages mirrored in B?" |
coverage_b_in_a | The same direction reversed. Asymmetric — corpora differ in size and focus. |
Coverage sampling uses a fixed seed, so identical inputs produce identical numbers across runs.
rlat summary
Extractive primer generation. Produces a structured markdown document capturing what is in a knowledge model — designed to be loaded into an AI assistant's system prompt so it knows the corpus shape without spending tokens on a full search.
rlat summary km.rlat [-o output.md] [--query "..." ...] [--source-root DIR]
# The canonical assistant-integration pattern:
rlat summary my-corpus.rlat -o .claude/resonance-context.md
| Section | Source |
|---|---|
| Landscape | top hits against the corpus centroid — "what is this model about?" |
| Structure | source-file breakdown sorted by passage count |
| Evidence | per-query top hits (only when --query is given; repeatable) |
rlat skill-context
Markdown context block for the Anthropic skill !command
dynamic-injection primitive. The shell command runs before the
model sees the skill; its stdout replaces the placeholder.
rlat skill-context km.rlat --query "..." [--query "..." ...] \
[--top-k N] [--token-budget T] \
[--mode augment|knowledge|constrain] \
[--source-root DIR] [--strict] [--strict-names]
Output carries citation anchors, a per-passage drift status, and a
confidence-metrics header so the model can self-judge. Multiple
--query flags emit one block per query, in submission
order — useful for pairing a fixed preset query with the user's
query. --strict exits with code 2 if any passage has
drifted; --strict-names exits with code 3 on a
name-aliasing refusal.
rlat refresh
Bring a local-mode knowledge model back in sync after you edit source files. Incremental — unchanged passages keep their band rows untouched; only modified and added passages are re-encoded.
rlat refresh my-corpus.rlat # apply all deltas
rlat refresh my-corpus.rlat --dry-run # report counts only
Local mode only. Bundled archives are immutable post-build (re-run
rlat build); remote archives route to
rlat sync.
After a refresh, any insight whose cited source content hash
changed is flagged stale by the drift cascade.
Override flags: --source (repeatable),
--source-root, --ext (repeatable), and
--batch-size.
rlat watch
A live, silent, self-discovering refresh loop. It sits on top of
rlat refresh — running the incremental delta-apply
pipeline on every save after a debounce window, so the archive
stays current as you edit.
rlat watch # zero-arg: discover *.rlat in cwd, watch all
rlat watch my-corpus.rlat # explicit single archive
rlat watch --once # CI / pre-commit: synchronous one-shot reconcile
rlat watch --verbose # print one line per refresh (default: silent)
The default UX is silent — errors are loud, success is invisible. A
short startup line confirms what is being watched, then the loop
falls quiet. --once is the CI / pre-commit shape: a
synchronous one-shot reconciliation with no observer, since in CI
the files have already changed before the command runs. Watch
requires the [watch] extra:
pip install rlat[watch].
rlat sync
Bring a remote-mode knowledge model back in sync against upstream.
The same incremental delta-apply as refresh, with the
upstream-state oracle replaced by a network poll.
rlat sync my-corpus.rlat # poll mode (default)
rlat sync my-corpus.rlat --upstream-manifest <url> # catalog mode
rlat sync my-corpus.rlat --dry-run # list paths only
Catalog mode (--upstream-manifest)
diffs an upstream JSON catalog against the archive's pinned
manifest and detects added, modified, and removed paths.
Poll mode (default) re-fetches every URL in the
existing manifest and detects modified and removed paths only — it
cannot enumerate new files. If poll-mode requests hit a network
error, sync aborts rather than silently deleting corpus content;
--treat-unreachable-as-removed is the explicit opt-in
to drop those paths.
rlat freshness
Remote mode only — bundled and local archives print a friendly
error pointing at rlat build / rlat refresh.
rlat freshness my-corpus.rlat # text report (per-entry status)
rlat freshness my-corpus.rlat --format json # structured counts + per-entry map
It walks every manifest entry, downloads the upstream bytes, hashes
them, and reports per-entry status (verified /
drifted / missing). Read-only; exits with
code 2 if any entry is non-verified — suitable for CI gating before
deciding to run rlat sync.
rlat convert
Switch a knowledge model between storage modes
(bundled / local / remote)
without rebuilding embeddings. The band,
registry, and ANN index are
storage-mode-independent — conversion is a metadata and payload
shuffle, atomic in place by default.
rlat convert km.rlat --to {bundled|local|remote} \
[--source-root DIR] \
[--remote-url-base URL] \
[-o output.rlat] \
[--dry-run]
| From → To | Required flags |
|---|---|
local → bundled | (none) |
local → remote | --remote-url-base |
bundled → local | --source-root |
bundled → remote | --remote-url-base |
remote → local | --source-root |
remote → bundled | (none) |
--to <current_mode> is a friendly idempotent
no-op. Before writing, every kept passage's content hash is
re-validated against live bytes; if any passage has drifted,
conversion aborts with the drift report — run rlat refresh
or rlat sync first, then retry. passage_id
and content_hash are preserved across every
conversion.
rlat audit
Read-only inspection of the source/insight provenance state. It surfaces layer sizes and the insight verdict states.
rlat audit km.rlat # summary (layer sizes, verdict states)
rlat audit km.rlat --stale # list insights flagged stale by the drift cascade
rlat audit km.rlat --orphans # list insights whose cited source was removed
rlat audit km.rlat --format json
The audit also surfaces the corpus's own self-audit — the
LLM-free shape report computed at build/refresh: under-served demand gaps and
same-topic cross-document contradiction candidates (high-cosine pairs
worth a stance check). --with-text / --min-cosine
recompute the candidates live at a chosen cosine floor with resolved text
(judge-ready, demand-ranked); --external lists web-fetched claims
and their source URLs — the input to a world-freshness re-check.
rlat audit km.rlat --shape # demand gaps + contradiction candidates (stored)
rlat audit km.rlat --shape --min-cosine 0.85 --with-text # live, judge-ready candidate pairs
rlat audit km.rlat --external --format json # web-fetched claims + their source URLs
rlat trace
The full provenance chain for an insight or a source passage. Given
an insight_id, it prints the cited source passages
with hash and char span, plus any lineage chain. Given a source
passage_id, it prints every insight that cites that
passage (a reverse trace).
rlat trace km.rlat <insight_id-or-passage_id> [--format text|json]
rlat reverify
After rlat refresh flags insights as stale
(because their cited source content hash changed), reverify
asks an LLM whether the updated source still supports each insight.
Survivors flip back to accepted with refreshed
citations; failures retire. LLM-driven — needs an Anthropic API key
(~1 call per stale row).
rlat reverify km.rlat [--limit N] [--model ID] [--verbose]
rlat grow
One opt-in pass of the self-improvement loop. Reads the archive's
own persisted telemetry for confirmed-recurring intents the corpus
answers relatively worst, authors a grounded fill for the top
--max-fills of them, and lands each through the
faithfulness gate + compression test into the insight band.
--dry-run previews the candidates with no LLM call and
no writes. Opt-in by design — it spends LLM calls and writes to the
archive, so it never runs implicitly. Telemetry accrues when
sessions run with RLAT_CAPTURE_PERSIST=1; with no
telemetry the command is a clean no-op.
rlat grow km.rlat [--max-fills N] [--dry-run] [--source-root DIR] [--model ID]
rlat probe
An idle-cycle self-probe. Between active sessions it scans the
workspace event ledger for weak zones — queries that previously
failed to ground, or repeated queries that never received a
positive verdict — and re-attempts deep-search against
the current corpus. Successful re-runs write synthesis candidates
automatically. LLM-driven — needs an Anthropic API key.
rlat probe km.rlat [--limit N] [--max-hops N] [--top-k N] [--dry-run]
rlat capture-env
Auto-probe the machine-readable environment and land every observed attribute in the knowledge model's insight band — shell version, operating system, account type, execution policy, domain membership, proxy, plus the corpus size read from the archive itself. One command, zero questions, zero confabulation: a probe only writes a value it actually read, so a captured fact can never be invented. Each attribute lands keyed, so re-running updates in place rather than duplicating.
rlat capture-env km.rlat [--no-corpus-size]
| Flag | Default | Effect |
|---|---|---|
--no-corpus-size | off | Skip the corpus-size attribute (the passage count read from the archive). |
$ rlat capture-env my-project.rlat
+ The user is running PowerShell 7.4.6 (Core edition).
+ The user's operating system is Windows 11 Pro.
+ The user's knowledge model contains 39 passages.
[rlat capture-env] captured 3 attribute(s) into my-project.rlat
rlat capture-attribute
Manually record one fact about your world — the fallback for facts no probe can read. The claim lands in the knowledge model's insight band, born active, and is served alongside retrieval from then on.
rlat capture-attribute km.rlat "<text>" \
[--kind attribute|constraint|falsified] \
[--criticality low|normal|high|critical] \
[--attribute-key KEY]
| Flag | Default | Effect |
|---|---|---|
<text> | (required) | The fact, or - to read it from stdin. |
--kind | attribute | attribute — a fact about your environment. constraint — a standing rule, always served rather than retrieved by similarity. falsified — something proven wrong, stored as a negation claim. |
--criticality | high | How decisive the fact is for answers: low / normal / high / critical. |
--attribute-key | (none) | Normalized subject for serve-time dedup (e.g. workspace capacity). Within the same kind, the newest value for a key wins at serve time. Omit to leave unkeyed — never deduped. |
# A fact about your environment — keyed, so a newer value replaces it
rlat capture-attribute my-project.rlat \
"The team's Fabric capacity is an F64 SKU." --attribute-key "fabric capacity"
# A standing rule — always served, never lost to a similarity miss
rlat capture-attribute my-project.rlat \
"Deploys to prod happen Tuesday only." --kind constraint
# Something proven wrong — put the evidence in the text
rlat capture-attribute my-project.rlat \
"Tried caching encoder weights in OneLake; falsified by the 2026-05 latency benchmark." \
--kind falsified
rlat memory <subcommand>
Per-user flat memory. Memory is a flat, polarity-tagged,
confidence-graded row store — one embedding band plus one row file
per user, at ~/.rlat/memory/<user-id>/. Rows
carry a primary polarity (prefer / avoid /
factual) and a workspace scope tag. The
claim system page is the full guide; the
subcommand surface is:
| Subcommand | Purpose |
|---|---|
add | Append a manual row; auto-stamps the cwd workspace tag. |
list | Tabular view of the row store, with optional filters. |
recall | Gated retrieval. Synchronous one-shot by default; --daemon boots the long-lived recall server. |
feedback | Log a good/bad vote on the most recent recall injection. |
consolidate | Run the session-end pass: confidence raise → forget. Fully mechanical — no LLM, no key. Flags: --cwd, --dry-run. |
verify | Check high-criticality rows against a corpus. Needs an API key. |
corroborate | User corroboration — raise a row's confidence one step. |
eval | Print the longitudinal scorecard (useful + effortless axes). |
rollup | Weekly digest — this week versus the prior week. |
dedup | Retroactively collapse same-text, same-workspace rows. |
session-mark | Record a session-boundary timestamp. |
train | Mutate a row (--bad-vote / --good-vote / --corroborate); the full training loop runs via the /rlat-train slash command. |
gc | Manual escape-hatch deletion; requires at least one filter, never automatic. |
doctor | Probe the per-user store, the recall daemon, and the encoder revision. |
hook | UserPromptSubmit hook entry point — wired via settings.json. |
install-hooks | Wire the recall + capture hooks into Claude Code settings.json. --user targets ~/.claude/settings.json; --project-dir sets the project root containing .claude/ (default: cwd); --mine also sets RLAT_MINE_ATTRIBUTES=1 to opt into passive world-fact mining. Idempotent; preserves foreign hooks. |
capture | SessionEnd hook entry point — wired via settings.json. |
0 success · 1 usage / runtime error ·
2 deprecated subcommand (primer — replaced
by the per-prompt UserPromptSubmit hook) ·
3 a surface that runs as a Claude Code slash command
rather than a CLI body (train <task> →
/rlat-train).
# Add a manual row — defaults to polarity=factual + the cwd workspace tag
rlat memory add "prefer pytest -xvs <path> for debugging" --polarity prefer
# Cross-workspace habit — visible in any cwd
rlat memory add "prefer Sonnet 4.6 over Haiku 4.5" --polarity prefer --scope cross-workspace
# Inspect and recall
rlat memory list --polarity prefer
rlat memory recall "how do I run the tests" --top-k 5 --explain
# Garbage collect — requires a filter; --dry-run previews
rlat memory gc --is-bad --dry-run
rlat intent <subcommand>
Declare and resolve the live intent graph at
.rlat-state/intent/ — the goals, tasks, and steps the
agent is working toward.
| Subcommand | Purpose |
|---|---|
add | Declare a new live intent (a step or task). |
list | List live intents, optionally filtered by status. |
path | Print the parent chain (root → leaf) for an intent. |
accept | Record a user-source satisfied verdict on an intent. |
reject | Record a user-source not satisfied verdict on an intent. |
activate | Flip a proposed intent to active. |
what-next | Recommend the next move from the live intent graph. Uses an LLM to phrase the recommendation when a key is present; falls back to a plain top-candidate readout without one (--no-llm forces the fallback). |
decompose | Decompose a task intent into step children via an LLM. Needs an API key — refuses cleanly without one. |
declare-durable | Declare a durable goal or direction, written to the per-user store. |
durable | List durable goals and directions. |
capture-plan | Capture plan-mode output as a proposed task plus steps. |
accept and reject here are
intent verdicts — the user telling the agent whether an
intent was satisfied. They are not a memory or insight promotion
gate; insight promotion is faithfulness-gated and outcome-driven.
rlat expertise build
Render the expertise primer — the earned synthesis of the
memory and intent layers — to disk (default
.claude/expertise.md) so the agent reads it on session
start.
rlat expertise build [--out PATH] [--max-intents N] [--max-memory-rows N]
rlat workspace
Resolve or declare the per-project workspace identity the harness uses for memory and intent tagging.
rlat workspace status # show the resolved identity + its source
rlat workspace declare --name my-proj # write a workspace declaration override
rlat lens <subcommand>
Manage .lens artefacts — a saved perspective that
reweights retrieval. The claim system page is the
full guide.
| Subcommand | Purpose |
|---|---|
create | Create a new empty lens (--id, --name, --scope, optional --stance file). |
show | Inspect a .lens file. |
compose | Combine two or more lenses into one. |
rlat lens create --id team-a --name "Team A" --scope team -o team-a.lens
rlat lens set-trust team-a.lens "docs/external/*" 0.2 # suppress external docs
rlat lens set-trust team-a.lens "src/*" 2.0 # boost first-party source
rlat lens set-trust team-a.lens "src/*" --remove # drop a weight again
rlat lens show team-a.lens
rlat search my-corpus.rlat "..." --lens team-a.lens
rlat fabric
Manage the fabric://<alias> aliases used by
rlat search fabric://.... Each alias maps to a
Microsoft Fabric User Data Function endpoint URL.
rlat fabric add team=https://<udf-endpoint-url> # register an alias + scaffold the skill
rlat fabric list # show all registered aliases
rlat fabric remove team # drop an alias
rlat fabric publish-rlat ./team-docs.rlat \ # maintainer: upload .rlat + update the manifest
--workspace <ws-id> --lakehouse <lh-id>
Each add / remove rewrites a
rlat-fabric-search skill under
.claude/skills/ so Claude Code's skill list reflects
the current alias set. The first fabric:// query mints
a Microsoft Entra token — device-code flow by default, with a
service-principal fallback when the Azure environment variables are
set. See the Fabric page for the
end-to-end setup.