Skip to content

Particles CLI

The particles CLI implements the v0.3 Core loop: deposit sources, extract particles (with automatic subject resolution), query them, and maintain the knowledge base over time.

Prerequisites

uv sync
export ANTHROPIC_API_KEY=sk-ant-...   # required for extract, query --semantic, lint --semantic
uv run particles db init

Commands

Command What it does
config validate Load the config file (PARTICLES_CONFIG, else ~/.particles/config.yaml; never the working directory's) plus env-var overrides through the same path the SDK uses, name where it came from and any nearby config.yaml it ignored, and report a human-readable PASS/FAIL: each invalid field as section.field: message, or a readable YAML parse error. Exits non-zero on the first problem, so a deploy can gate on it. With no config.yaml, reports valid against compiled-in defaults.
db init Create database tables. --force drops every particle-store table (preserving the corpus) and resets snapshots to PENDING, the scrap-and-re-extract path for crossing a SCHEMA_VERSION major bump. Confirms before dropping. Once per store, db init also marks each file:// entry that records no host as this host's file, since the local refresh reads only its own host's files; run it on the machine whose files the store tracks. --origin-preview prints what it would mark, by class, and changes nothing.
db backup DIR Consistent online copy of the store and its blobs. Writes DIR/particles.db (SQLite's VACUUM INTO, one read transaction, so writers keep running and none appears half-done in the copy) and DIR/corpus_blobs/ (every blob, its SHA-256 checked on read and write), then runs PRAGMA quick_check and the corpus fsck audit over the copy. DIR must be new or empty; the layout is the container's /data volume. Refuses a non-SQLite store, the live store's own directory and a target inside the live blob dir. Exits non-zero unless the copy verifies. Local-only. See Operator Guide → Store consolidation.
init claude-code One-command Claude Code memory integration: merges a SessionStart digest-push hook + a SessionEnd harvest hook into ~/.claude/settings.json (--project → the repo's gitignored .claude/settings.local.json), provisions ~/.particles/claude-code/, and (on a fresh install with no write-enabled store) creates and enables a memory store via a parse-preserve-append config.yaml edit. The installed commands, and the MCP server registration, always carry absolute env pins (PARTICLES_CONFIG, and DATABASE_URL for the default store, which the MCP registration also pins to the installed store when the config names no absolute one; the config is --config, else PARTICLES_CONFIG, else ~/.particles/config.yaml, which init creates when missing) so harvest resolves the same store even though Claude Code runs the hook from the session's working directory, routinely a git worktree, not the store's directory. Marker-owned merge: re-running repairs/upgrades exactly the Particles-owned entries (re-run to add the pins to an install predating this fix); --remove deletes exactly those (and reverts the store auto-create only while the store is still empty); --dry-run previews; --command overrides the hook executable path; --no-audit skips the first-run audit hand-off. The verb also installs the agent-onboarding skill files into ~/.claude/skills/particles/ (--no-skills opts out; --remove deletes exactly that subdirectory). --json emits a machine-readable result on stdout (store, scope, what was created, the installed hook commands, and a next_steps list of what is left for the human) so an agent can run the installer itself and report the outcome instead of scraping human output. It implies --no-audit (the audit hand-off is interactive) and names the standalone particles audit under next_steps. This is the local half of agent-first onboarding: it mints no credential and never widens mcp.write.enabled_stores; a network MCP auth model is decision, not this verb's. A user-scope install also registers the MCP server with claude mcp add --scope user … mcp serve --project-observer cwd, keeping an existing registration's executable and env and adding the flag plus any missing pin; --dry-run shows the command, --remove restores the registration it changed, and without the claude CLI the command goes to next_steps. next_steps also counts what a project observer would not show (unattributed and orphaned sources, lapsed beliefs, unmarked agent writes) with the command for each; init never assigns a project itself. Thin client: with --engine URL, or a pinned config that already names engine.base_url, the install writes the engine into the config, creates no local store and pins no DATABASE_URL, and gives the hooks and the MCP server each their own key in a 0600 token file (PARTICLES_ENGINE_TOKEN_FILE), asked for at a hidden prompt or named with --hooks-token-file / --mcp-token-file. It refuses an operator or shared key for either file, checks each key with the engine, keeps the token directory out of Time Machine on macOS, and lists in not_done the rescope, audit and rule-source steps a thin client skips; see Operator Guide → Remote engine. See User Guide → Claude Code memory.
init codex macOS Codex integration for a local store or a same-host engine. Plan and apply user hooks, MCP, and onboarding skills. Local stores use one consolidation schedule per physical store. Thin installs use checked recall, MCP, and optional capture token files. Supports --store, --config, --command, --dry-run, --remove and --json. Explicit hook trust, runtime fail-closed capture and scheduled credential readiness are required. See Codex memory.
hook doctor --harness codex / hook log --harness codex Inspect Codex ownership, pins, version evidence, observer policies, schedule, credential readiness and quarantine counts. hook codex-dismiss --session SESSION_UUID acknowledges an unresolved retry hint without changing captured corpus.
skills install / skills list Agent-onboarding skill files: three short, tool-agnostic Markdown files shipped inside the SDK (particles/skills/) that tell an agent which write verb to reach for (recording-a-belief.md), how to read effective confidence and the contested marker (asking-the-store.md), and that ruling on a contradiction is the operator's call, not the agent's (keeping-it-clean.md). skills install copies them into ~/.claude/skills/particles/ (--dir overrides, --project uses ./.claude/skills); the particles subdirectory is SDK-owned, so a re-run repairs/upgrades and --remove deletes exactly it and nothing beside it. --dry-run previews. Tool-agnostic Markdown is deliberate; a harness-specific skill schema would bind the SDK to one vendor's format. The files are documentation shipped as data: each links its canonical doc page and states no contract the docs do not. particles init claude-code installs them by default.
hook session-start / hook session-end / hook session-end-worker / hook log / hook doctor The machine-facing lifecycle verbs init claude-code installs. The installed SessionEnd command hands each ended session to hook session-end-worker, which runs in the background, harvests every queued session and re-renders MEMORY.md; hook session-end is the same harvest run inline, which installs from before 1.245.0 still use. session-start reads the hook JSON on stdin and pushes the store's memory digest into the new session's context (skipped on resume; capped by claude_code.digest_max_bytes); session-end distills the session transcript (speaker turns verbatim, tool calls one-line, tool results dropped), redacts common credential shapes, and deposits it as one APPEND_ONLY CONVERSATION corpus entry per session, plus the project's changed memory-file *.mds and a catch-up sweep over recent unharvested transcripts. Both degrade to exit 0 with no output on any failure and append one JSONL line per invocation to the hook log; hook log --tail N prints recent entries. Because Claude Code runs the hook from the session's working directory, init claude-code bakes absolute PARTICLES_CONFIG / DATABASE_URL env pins into the installed commands so the store resolves CWD-independently; hook doctor --store <handle> diagnoses that resolution from the current directory (config found, DSN, DB file, corpus tables) and exits non-zero on an unusable store; with engine.base_url set it probes the engine instead (GET /health reachability, latency and version, an authenticated GET /digest/{store}, whether /auth/whoami lists the store among those that accept the key's belief writes, and the harvest, Stop and projection status; see the remote-engine guide), and a table-missing harvest failure now logs an actionable hint. Debug loop: particles hook session-start --store memory < sample.json.
memory consolidate The dream cycle: one scheduled verb that runs the cross-session maintenance passes in order: extract catch-up (PENDING snapshots, rule and memory files first and then the longest-waiting, capped at consolidation.max_pending_entries), the reconcile sweep, the capped + delta-scoped contradiction/duplicate census (one collect_cards pass), run weekly by default (consolidation.census.interval_hours; between censuses the report says when it last ran and is next due), the curation-queue refresh over that same collection (or over the last census's stored collection on a night without one), utility mining, and the MEMORY.md projection re-render. It then writes one CONSOLIDATION_RUN operator event (per-pass status/durations/LLM call counts, machine-readable census, completed_at = the next run's delta watermark) and renders a delta report ("+2 contradictions since the last census"). Cadence is launchd/cron, not a daemon: --if-due exits 0 unless the last successful run is older than consolidation.min_interval_hours, so over-scheduling is harmless. --structural-only (or no API key / open breaker / consolidation.semantic: false) still runs the LLM-free passes with every skip disclosed; a degraded contradiction line reads "not probed this run", never "0". --scope delta\|store, --output FILE, --format markdown\|json. Exit codes: 0 success/skip, 1 pass(es) failed, 2 could not start. One cycle at a time via a kernel-held consolidate.lock: a running cycle is never reclaimed, a crashed one frees it at once, and a second caller exits 0 naming the holder's pid, start time and current pass. particles audit records the same run event (actor: audit), joining the delta chain. See Operator Guide → Scheduled consolidation.
memory rebuild-utility Re-mine every harvested session transcript into fresh utility evidence for the usefulness lens: the backfill that credits history when the feature is turned on or the matchers change. A belief is credited only when the session was shown it (its rule files, the files it read, and the recorded session-start context) and an LLM judge rules that the session's actions applied it; a literal token match only nominates a candidate. The verb plans every session first, prints the judge calls and their list-price cost, and asks before it clears anything (--yes skips the prompt). The calls go out as one half-price batch unless --no-batch. With utility.mining.behavioural_matching off the judge never runs, so the mined channel is rebuilt empty; the explicit channel (memory useful) is replayed from its event log either way.
memory rescope Bring a store's project keys up to date. A belief is in view for a project when one of its sources was harvested there, which is read from the project:<key> tag on the source's corpus entry; older versions stamped a per-worktree name, or nothing. rescope adds the project's real key beside whatever an entry already carries. It never removes a tag and a second run changes nothing. It reports what it could not attribute (harvested entries in view for no project until you --assign ENTRY_ID KEY them or pass --default-key KEY, where . means the current directory's project) and entries whose every key names a project that no longer exists. --dry-run writes nothing. particles init claude-code runs it. One OBSERVER_SCOPE_RESCOPED event is recorded per run, naming every key it added, and that event is what lets claude_code.observer_scope: project engage on the store at all. --assign refuses a global entry (a hand deposit, a web page): giving it a key would hide it from every other project. Agent writes: a deposit through an MCP server with no project binding, and every memory-server facade write, carries the compiled-in scope:unattributed marker, so it reads as unattributed rather than global. Older agent writes change only when you run --mark-agent-writes (with --dry-run to preview), which marks each keyless entry deposited by an agent identity (the two configured asserters, plus any --identity NAME), records one OBSERVER_SCOPE_MARKED_UNATTRIBUTED event per entry, and lists every depositor it did not match. --unmark ENTRY_ID reverses a recorded mark. --default-key never attributes a marked entry; --assign does, and the marker stays beside the key. A wrong key is repaired with --withdraw ENTRY_ID KEY, recorded as OBSERVER_SCOPE_KEY_WITHDRAWN. It refuses an entry's last key, since emptying a keyed rule file would make it global; with --leave-unattributed the last key may go and the entry is left in view for no project (a harness entry keeps its harness tag, any other gains the marker). No correction verb makes an entry global: that is memory widen. Reference documents: new document deposits are marked scope:reference as they arrive (see deposit). Entries deposited earlier change only when you run --mark-reference, which lists every global document entry (keyless, not harvested, not a rule file; vocabulary documents are skipped and counted) and marks them with --apply, one OBSERVER_SCOPE_REFERENCE_MARKED event per entry. --except ENTRY_ID (repeatable) keeps a listed entry global, and --unmark-reference ENTRY_ID makes a marked one global again. Run --apply only from a runtime that ships the flag: an older one cannot list the store's events once the new event type is written.
memory widen Put a belief in view for every project: particles memory widen <id> for one belief (UUID, unique prefix, or p-xxxxxxxx), --entry <corpus-entry-id> for every belief sourced from one document, --revoke to take it back. The belief and its sources are untouched; the widening is a standing statement the read lens consults, recorded as OBSERVER_SCOPE_WIDENED / OBSERVER_SCOPE_WIDEN_REVOKED. Operator-only, with deliberately no MCP tool: an agent that could widen its own belief could put it in front of every future session.
memory absences Retire the beliefs of memory files that no longer exist. The session-end hook records each small deletion in a Claude Code memory directory itself; it holds back the first deletion ever seen in a directory and a deletion of more than a quarter of its files (and at least five), and reports them in the next session's digest and in hook doctor. Without flags the verb reports, per memory directory the store serves (or each --memory-dir), the files no longer found, the beliefs their absences would retire, and how many of those are lines of MEMORY.md, writing nothing. --record records every absence and processes it at once with no model call; a belief another current memory file states is kept, and when another memory file of the project is still waiting to be read the absences are left for the next extraction pass, which reads that file first. --json prints the report as JSON. Local store only. Exit codes: 0 done, 1 a directory could not be read in full (nothing recorded there), 2 could not start.
memory redate Give each harvested session its own start as the reference date. A claim about an act a session performed is dated to the session's day (the session basis of valid_from); sessions harvested before 1.190.1 carried no date of their own, so their claims were anchored at the day they were extracted. The verb reads each session's start from its transcript under the Claude Code projects root (or under --transcripts DIR, for transcripts audited from a copy elsewhere: the folder itself or one level down), records it on the session's snapshots, and moves every session-dated claim of that session to that day: no model call, no claim dated any other way touched, sessions whose transcript is gone listed rather than guessed, idempotent. --dry-run reports the counts. A claim on any day the session's turns fall on is left where it is, since an act after the first day is dated by its own turn. The verb also lists the sessions that span more than one day: their claims were extracted before transcripts carried their days, so every act is dated to the first day, in the claim's date and in its text. --reread re-reads them from their first day change: it deposits each session's current distillation, retires the claims read from the first snapshot that reaches a day change on, and reads that text again. Nothing on a retired claim (tags, links, use history) carries over, and the estimate it prints first says how many retired claims carry any. It asks before spending; --yes spends without asking (a non-interactive run needs it), --dry-run stops after the estimate, and --skip ENTRY_ID leaves a session out. Local store only. Exit codes: 0 done, 1 a session's re-read failed, 2 not started.
memory useful Mark a belief useful: the explicit second utility channel, for the belief class the transcript miner cannot observe at all. A prohibition ("never prepend export PATH") or a design stance is complied with by not acting, and the miner reads tool-call lines only, so those beliefs leave no action trace and stay out of the projection head however the matchers are tuned. particles memory useful <id> credits one directly: PARTICLE_ID accepts the raw UUID, a unique id prefix, or the p-xxxxxxxx display form, resolved against ACTIVE beliefs, and an id matching none or several is a hard error rather than a silent credit to the wrong belief. --reason records an operator note on the BELIEF_MARKED_USEFUL event. One press is worth utility.explicit_weight mined events (default 25.0) because the miner fires once per session while you fire once, and it is capped at one credit per belief per day for each interface (the CLI and the engine's POST /memory/useful); press again and the gesture is recorded but not double-counted. Promotion-only and projection/digest-only: it never touches the stored confidence and never claims the belief is true (for "still true", the gesture is curate apply affirm). Operator-only, with deliberately no MCP tool, since an agent crediting its own beliefs would close a self-reinforcement loop the containment cannot reach. On a keyed engine an agent key may still call POST /memory/useful: the press is recorded as a BELIEF_MARKED_USEFUL event that names the key's principal (http_principal) and carries operator_credit: false, and it earns no credit, so an agent can neither add to the credit nor use up the operator's for the day. Only the CLI, PARTICLES_API_KEY and an operator key earn it.
memory sweep-rank-lift Calibrate the usefulness rank-lift: a read-only sweep of utility.default.rank_lift (lambda) over your store: no writes, no LLM calls, no embeddings. Name the beliefs that ought to reach the projection head with --target (repeatable; accepts the raw UUID, any unique id prefix, or the truncated p-xxxxxxxx display form, resolved against ACTIVE beliefs; an id matching none or several is a hard error rather than a silent rank-0 that would report an empty band) and each rendered head size with --head (repeatable; defaults to mcp.recall.digest_max_beliefs). Reports, per lambda on the grid, where those beliefs rank and how many head slots hold distinct content, then the admissible band per surface, their intersection, and whether the configured value sits inside it. --grid-max / --grid-steps set the grid, --distinct-ratio the diversity bar (default 0.95; 1.0 is unsatisfiable at large N on any store with over-extraction). --format json for machine consumption. Lambda is deliberately not auto-fitted: nothing labels which belief should hold a head slot, and the confidence spread a fit would key on is flattened to zero by the cap. Instead, the operator supplies the targets and this makes that one command. --project KEY (. for the current directory) ranks the head a session in that project sees, global beliefs plus the project's own (gate B), and says so above the report. --off-head-cohort instead judges the configured value the way the nightly monitor does, with no targets: the head must hold the beliefs applied outside it and keep room for beliefs with no use yet; --min-sessions, --capture and --entry-share override the utility.monitor thresholds. See Operator Guide → Calibrating rank_lift.
memory sweep-owner-lift Calibrate the owner-relevance lift: the sibling of sweep-rank-lift for owner_lens.rank_lift (omega): a read-only sweep with no writes, no LLM calls, no embeddings. Omega is store-specific and ships 0.0 (the lens is inert until you set it), and it has no compiled-in default because the viewer cohort's size varies by two orders of magnitude between store genres. Unlike the usefulness lift it multiplies a flat 0/1 indicator, so it behaves as a threshold over the whole cohort (below it nothing moves, above it every belief about the viewer arrives in the head at once), which is why the report is keyed on the cohort's share of each head rather than one belief's rank. --max-owner-share bounds that share (default 0.5), --min-owner sets how many viewer beliefs the head must hold, and --target (repeatable, same id forms) names beliefs that must stay in the head: that is a non-regression check against omega = 0, so a target already outside the head for unrelated reasons is disclosed in its own section instead of quietly emptying the band. The usefulness lambda in force is held fixed throughout, so what is measured is what aboutness does to the head usefulness already shaped. --head per rendered surface, --grid-max / --grid-steps for the grid, --project KEY for the head one project's sessions see, --format json for machine consumption.
deposit Add a file or URL to the corpus. A JSON file whose top-level keys are name / version / tags is auto-detected as a TaxonomyDefinition (source_type = TAXONOMY_DEFINITION); run extract on it to materialise the tag tree; see Querying → Creating a taxonomy. Reddit /s/ share links (the mobile share-sheet form, e.g. reddit.com/r/<sub>/s/<id>) are accepted and resolved to the canonical /comments/ permalink before fetching, so they deposit as the underlying post + comments rather than falling through to the web extractor. For link-shaped sources (Reddit / HN / Mastodon link cards), --follow-post-links deposits the post's primary URL as a separate corpus entry and records the relationship in corpus_follow_edges. Defaults to True for Reddit / HN / Mastodon; explicit --no-follow-post-links disables. --follow-comment-links is reserved but deferred; passing True today logs a warning and proceeds without comment-link follow. For a personal journal, --journal marks the deposit as JOURNAL so the journal-aware extractor handles it, reifying feelings/opinions and emitting the entry-level NARRATIVE graph. For an archival local file, content_published_at is captured at deposit so its particles aren't all stamped with the import date: precedence is --date YYYY-MM-DD (explicit override) › a leading date line in the content › the file mtime, tuned under the deposit_date config section. --date applies to local files only and is ignored (with a warning) for URLs. For a single local file that concatenates many dated entries (a journal, changelog, or daily-log where each entry begins with a date on its own line), --split-by-date segments it at those date-line boundaries and deposits N corpus entries, one per dated section, each carrying its own content_published_at. It is opt-in (default off leaves one-file-one-entry behaviour unchanged), local-files-only, mutually exclusive with --date, and composes with --journal / --source-type / --tags; a file that is not actually multi-entry deposits as a single entry. For a literal string (a note you want recorded now, without writing a temp file first), --text '…' deposits it directly, and particles deposit - reads the same content from stdin (the CLI half of the MCP deposit_text tool). It defaults to CONVERSATION and attributes the entry to --deposited-by on both the deposited_by and author_id axes, so an operator's note is not filed at agent trust. Mutually exclusive with a source argument; the file-only flags (--date, --split-by-date, --mutability, --fetch-policy) are refused rather than silently ignored, since a pasted string has no file on disk to revisit. Depositing a source whose bytes match its entry's latest snapshot writes nothing: the existing entry_id / snapshot_id are echoed with an unchanged: line, and no extraction is queued. To re-extract an unchanged source on purpose, run particles reindex --entry-ids <entry_id>. A different --date on the same file still records a new snapshot, so re-dating an archival entry keeps working. Reference by default: a deposit that names no project is marked scope:reference. It answers questions from every project, as before, but the session-start digest and the agent-memory region leave it out and say how many they left out, so a new project does not open on articles you read. Pass --standing for a document every project should start from; on a re-deposit of an entry already marked reference, --standing removes the mark.
corpus list List deposited corpus entries (entry id, source type, latest-snapshot extraction status, ACTIVE-claim count, source URI). --source-type filters. --json emits machine-readable records with the full, untruncated fields (entry_id, source_type, uri_r, extraction_status, particle_count, tags, created_at); the human table left-truncates uri_r, so use --json to reconstruct deposit commands or diff corpus sets across stores. Local-only (no engine endpoint; refuses in remote mode).
corpus cat <snapshot-or-entry-id> Dump a snapshot's stored content, the exact bytes the extractor saw. Accepts a snapshot ID or a corpus-entry ID (prefix OK; an entry resolves to its most-recent snapshot). Default output is the same text the extractor derives from the blob (html2text for HTML, pypdf for PDF), so an empty preview directly explains an Empty content / zero-particle extraction (a bot-wall, login page, or JS-only shell that fetched but carries no article text). --raw streams the original bytes (pipe to a file or less); identifying metadata (snapshot id, content hash, byte size) goes to stderr so stdout stays pipeable. Works against a remote engine via GET /corpus/blob/{selector}.
corpus links list [entry-id] Audit the corpus_follow_edges graph written by deposit-time URL following. Without an entry-id, lists every recorded edge; with one, shows outgoing/incoming follows per --direction {out,in,both}. The downstream consumer that makes the deposit-follow pipeline operator-visible.
corpus links suggest Rank URLs the corpus cites but has not deposited, by trust-weighted distinct-source diversity × recency, surfacing primary sources the corpus only knows by hearsay. Suggestion-only: nothing is fetched or crawled. --limit / --min-sources override the config defaults; -o json for machine output. Deposit one with deposit <url>.
corpus links dismiss <url> Stop a URL from resurfacing in corpus links suggest. Permanent by default; --snooze N suppresses for N days. Audited in the operator event log.
corpus delete <entry-id> Delete a corpus entry, its snapshots, and every particle whose only source is that entry. A particle that another entry also supports is kept, with this entry's source refs removed; if one of them was its earliest source, the next-earliest becomes its age anchor. Premise refs on derived particles are left for the revalidation ladder. The preview shows the delete-versus-keep split before the confirmation prompt, and the delete records a CORPUS_ENTRY_DELETED operator event holding the entry id and counts, not the deleted content. It also sweeps the index rows keyed on the deleted particles (particle_subjects, particle_tag_edges, particle_relations), removes subjects left with no remaining link, and drops synthesis_cache rows keyed on those now-orphaned subjects. --yes skips the confirmation prompt.
corpus retract <entry-id> Non-destructive sibling of delete. Bulk-transitions every live particle (ACTIVE / INCONSISTENCY) from a source to RETRACTED (reason SOURCE_RETRACTED) while preserving the corpus entry, its snapshots, and the particles, so the audit trail of "we believed X until source Y was retracted" survives. Use this (not delete) when a publisher retracts an article. Live-only and idempotent. --reason is recorded in the operator event log; --dry-run previews the plan; --yes skips the prompt. Run lint afterwards to cascade PROVENANCE_STALE downstream. See Operator Guide → Auditing operator actions.
corpus prune-orphans One-off maintenance sweep for DBs that accumulated dangling rows from older deletes: index rows pointing at deleted particles, subjects with no remaining link, and synthesis_cache rows keyed on vanished subjects. Prints a per-table count, then deletes after confirmation (--yes to skip). A clean DB reports "Nothing to prune."
corpus refresh [entry-id] Re-check deposited local sources against the files on disk, the on-demand form of consolidation pass 0.5. Walks every entry with a file:// URI-R and fetch_policy=LAZY, comparing the file's mtime and then its SHA-256 against the latest snapshot; a changed file gets a new PENDING snapshot, which extract --all-pending turns into current beliefs (and, for a MUTABLE entry, retires the generation it replaced). No network. --force skips the mtime check and the re-fetch floor. Given one entry ID, a URL entry is re-checked too: an entry a domain importer deposited (Reddit, Hacker News, Mastodon, GitHub, Wikidata, Nomisma, Numista) is fetched again by that importer, the way its deposit was, and any other URL with a GET. That is how a Reddit thread deposited before the archive settled its scores picks them up. --backfill-cascade instead applies the generation demotion to entries whose snapshots moved before the cascade existed; previewed, then --yes-gated. Opt a file in with particles deposit <path> --mutability MUTABLE --fetch-policy LAZY. See Operator Guide → Refreshing mutable local sources.
corpus fsck Exhaustive blob audit + re-home: the operator-invoked sibling of the sampled reachability probe config validate runs. Resolves every blob-bearing snapshot, stats each against the resolved blob_dir, and reports three disjoint counts: present, found elsewhere, missing. Search scope is explicit, never inferred: the blob dir plus each repeatable --search <dir> (a blob root, the directory holding the two-character shards). It does not hunt for corpus_blobs/ trees, guess at sibling worktrees, or read git metadata, because the content-addressed layout makes a false positive silent. --re-home copies (never moves) the strays home, rejecting any candidate whose recomputed SHA-256 does not match the name it was found under; re-running is a no-op. --dry-run reports what --re-home would copy. The database is never written: blobs that are genuinely gone are reported with their entry IDs and URIs, and the choice between re-depositing from source and corpus retract stays yours. Exits non-zero while any referenced blob is unreachable. Local-only.
particle retract <id> Retire one belief under operator authority: the narrow escape hatch beside the cross-asserter guardrail, for when corpus retract (every particle from a source) is too broad and widening mcp.write.allow_cross_asserter would grant every future agent session more than the job needs. ACTIVE → RETRACTED with reason EXPLICIT_RETRACTION, routed through update_particle_status so the retired_at stamp and a PARTICLE_RETRACTED event carrying --reason are both written, under actor cli:particle-retract. --reason is required; the target is printed and confirmed first (--yes skips, --dry-run writes nothing). Deliberately not gated on mcp.write.enabled_stores; that knob is agent policy, and this is the operator's own store. An operator-asserted (HUMAN_REVIEW) claim is retractable too; a HUMAN_REVIEW REVIEW record is still refused, since revising one is Review's job. Id prefixes accepted. Local engine only. Run particles lint afterwards to cascade PROVENANCE_STALE. See Operator Guide → Auditing operator actions.
particle date <id> --from <date> --kind <EVENT\|STATE> --reason <text> Set one claim's world-time start by operator verdict: when it begins to hold and whether it is a moment or a span, the fields query --during reads. Records a PARTICLE_DATED event with the reason and pins the value, so particles validity never overwrites it. --clear removes the record. An EVENT is refused on a claim that carries a valid_until: a moment has one end. Content, confidence, provenance, status and valid_until do not change. --dry-run shows the plan. Local store only.
particle restore <id> --replacement wrong\|holds Return a claim an automatic rung retired as replaced (an update, a document supersession, a re-anchor restatement). The row is never revived: a successor is minted with the claim's content, confidence, provenance, subjects and embedding, and a RETIREMENT_RESTORED event records the ruling. --replacement is required: wrong retracts the replacing claim under operator authority, so its re-extraction is held for review; holds keeps both claims ACTIVE and exempts the restored claim from every route that retires by replacement. --from-entry <entry-id> restores every claim whose replacement came from that entry within mcp.recall.digest_retirement_window_days; the session-start digest prints these commands. Each ruling is also kept in demotion-rulings.jsonl. --dry-run shows the plan, --yes skips the prompt. Local store only. See Lint and review.
particle reclassify <id> --modality <M> --reason <text> Correct one claim's adjudicability default. assertion_modality decides whether the write path may arbitrate a claim against another: only FALSIFIABLE claims are compared, superseded, or filed as an INCONSISTENCY. The extractor sets it once; this sets it by operator verdict, records a MODALITY_RECLASSIFIED event with the reason, and pins it, so particles modality never overwrites it. Content, confidence, provenance and status do not change, and a claim an earlier arbitration retired stays retired. The next particles memory consolidate run re-pairs the claim under its new default. --dry-run shows the plan. Local store only.
rules Show the rule-source set, the operating documents (AGENTS.md, CLAUDE.md, …) this store tracks, with each file's entry id, fetch_policy, snapshot count, and last-checked date. Registered in rule_sources.paths; when that is empty the set is discovered (the nearest ancestor of the working directory holding a .git entry, plus ~/.claude), and the resolution is always printed before anything is written. It also lists the refresh roots rules sync and init claude-code recorded (one that no longer exists is marked missing) and counts any LAZY local source outside every allowed root, which the refresh does not read. Exists because conversation harvest yields claims about your rules, never the rules themselves.
rules sync [path…] Deposit / re-register the rule-source set as LOCAL_MARKDOWN + MUTABLE + fetch_policy=LAZY, tagged rule-file, so the refresh loop keeps it current from the first sweep. Idempotent (identity is the file:// path, so unchanged content writes nothing); --dry-run resolves and prints without writing; explicit path arguments override the configured set for one run. Every root it resolves is recorded as a root the refresh may read rule files under, whatever directory the refresh later runs from. A file carrying a projected region is deposited stripped and therefore held out of the byte-level loop; refresh those by re-running this verb. particles init claude-code runs it on install. The verb also re-applies the scope exemption to the tracked set's already-extracted particles, so a rules document's prescriptions reach the default query + projection surfaces instead of being hidden as DOCUMENT_META; --restamp-only does just that half (deterministic: no LLM call, no re-extraction). Against a remote engine (engine.base_url set) it pushes the files instead, since the engine never reads this client's paths: the project is the working directory's repository, a worktree resolved to its main checkout, plus the two files directly in ~/.claude; only what changed is sent, it records no refresh root, and --restamp-only is refused. The bare rules then lists what this client pushes. See Operator Guide → Refreshing mutable local sources.
corpus reorigin --from ID --to ID Move file:// entries from one host id to another, for a store db init marked on the wrong machine. --uri-prefix DIR narrows it to paths under a directory, --dry-run prints the count, and --yes skips the question. Local store only; writes one CORPUS_ORIGIN_REASSIGNED event. See Operator Guide → Remote engine.
rules forget ROOT… Remove recorded refresh roots, matched on the path as particles rules lists it, so a root that no longer exists can be removed. For each root it prints how many LAZY sources it admits (under it, and under the main checkout of a recorded worktree) stop being refreshed and how many another route still admits (local_refresh.allowed_roots, the memory-file rule, ~/.claude, another recorded root), naming that route. Only the rows are removed: beliefs and corpus entries stay, particles corpus retract withdraws a source, and rules sync from the same place records the root again. --dry-run prints the counts and removes nothing; each removal writes a RULE_SOURCE_ROOT_FORGOTTEN operator event.
extract Run LLM extraction on a corpus entry, or every PENDING snapshot with --all-pending. Each run ends with one LLM usage: line on stderr (calls, input and output tokens per purpose and model, and the list-price total from llm.price_per_mtok), and a run that made a call is recorded as one EXTRACT_RUN operator event. particles quality and the particles://digest/<store> resource sum those events with the consolidation runs into one line, "LLM spend recorded for this store: US$X across N runs since ". The figure is list price over recorded token counts, never a billing API, and runs made before 1.168.2 are not in it. Against a remote engine the engine records the run and the laptop prints no usage line. With --all-pending the run prints its estimate first (calls, a dollar range at list price and the wall time, plus the same figure on extraction.alternative_model when that is cheaper) and asks before spending above extraction.confirm_call_threshold calls; a run with no terminal stops there with exit 2 unless given --yes or --budget-usd. --estimate prints the estimate and exits, with no API key needed. --budget-usd N stops before a snapshot whose estimate would carry the run past N dollars and reports what is left and what finishing would cost; the rest stays pending. Pending edits of sources the store has already read are extracted before sources it has never read. --extraction-model provider:model routes extraction and subject resolution to another model for one run. A source whose every extraction call the model refused is recorded and held: --all-pending, the nightly catch-up and audit skip it until the extraction model or the source changes or extraction.refusal_retry_days (default 30) passes, and particles curate lists it. Naming the entry sends it at once, and --all-pending --retry-refused sends every held source.
query Ask a natural language question; supports --tag <path> (repeatable) for taxonomy-aware subtree-expanded filtering. --include-ancestors additionally walks UP each --tag's parent chain, so a query for a specific node also matches particles tagged only with a broader ancestor term. DOCUMENT_META particles (claims about a source's own structure) are excluded by default; pass --include-document-meta to include them. Non-asserted particles, a document's rejected / superseded / deferred / counterfactual prose (polarity DECLINED / HYPOTHETICAL), are likewise excluded by default; pass --include-non-asserted to include them. --assertion-modality <FALSIFIABLE\|EVALUATIVE\|EXPERIENTIAL\|CONSTITUTIVE> narrows to one truth-aptness modality (omit for all). --store <handle> (repeatable) federates the query across several stores; the first handle is the viewer whose trust policy ranks the merged results. By default each result prints its composed contested badge: one ⚠ contested (…) line naming whichever bases fired: a DISPUTES stance on record (with the unverified-holder caveat), a lens-divergence spread ≥ contestedness.callout_threshold, or an open INCONSISTENCY referencing the claim (with a (vs. p-xxx) drill-down); disable with contestedness.badge_enabled: false; see User guide → Querying. --contestedness shows each result's per-claim contestedness, the max−min spread of effective_confidence across your policy set (local policy + each adopted lens), attributed per policy; absent unless you have at least two policies (adopt a lens). Disclosure only: neither the badge nor the readings ever change ranking or confidence. --as-of <ISO-8601> answers from the beliefs held at that past instant (a bare date = start of that day, UTC): retired hits carry their supersession crossing (current status, retirement instant + its basis, and the replacing belief), decay and the recency window are evaluated at T, and retirements the store cannot date are excluded fail-closed with a disclosure line. A future instant is rejected. See User guide → As-of time travel.
query --during <start>..<end> / --on <date> Ask about a period of world time: what began in, or was in force during, an interval (inclusive ISO-8601 dates; either side of .. may be empty), or the point form --on. The window reads each claim's valid_from and valid_kind (a moment or a span) rather than when the store learned it, and cuts the candidate set before ranking, where --subject cuts, so a dated claim competes only with the claims of its period. With a question, ranking and the answer are as usual; without one the query is deterministic (no embedding, no LLM call), listing the admitted claims in date order with a reading per hit: began (its start lies in the window), in force (a span that started before and had not closed), held at (known to hold at an anchor, start unknown), within (anchored to a month or year). A retired claim is admitted for the period it held, closed at the earliest of its own end, its successor's start and its retirement, and marked; a restatement stands in for the original it supersedes. Undated and unkinded claims are counted in the footer, never placed. Composes with --as-of (world time first, then believed-at-T) and with the structural filters. The anchor step ("when did the user move?") is yours: ask it first, then ask with dates. See User guide → Asking about a period.
query (structural claim filters) The same verb also reads the structured-claim annotation. --predicate <term> (exact string, case-insensitive; a CURIE and its expanded IRI are different strings; discover terms with --predicates), --object-eq/--object-gt/--object-lt <v> (typed comparison: numeric xsd → number, xsd:date/dateTime → date; claims whose object would not normalize are excluded and disclosed, never silently dropped), --object-contains <s> (case-insensitive substring). With a question the flags prefilter the semantic candidate set (ranking untouched); without a question the query is deterministic (no embedding, no LLM call), listing matching claims by effective confidence. --count and --group-by subject\|predicate\|object are deterministic aggregates (claim counts + effective-confidence min/median/max; a simultaneous question is rejected); --min-effective-confidence <t> is the explicit aggregate floor (there is no default floor). --predicates lists the distinct predicate vocabulary. Every structural result carries the coverage footer ("matched against the N of M ACTIVE particles carrying a structured claim"); absence of a hit is not absence of a belief. Composes with --store, --as-of, --tag, --subject, --min-confidence unchanged. See User guide → Querying → Structural claim filters.
lint Check the store for staleness and contradictions. Each open INCONSISTENCY record is reported as one OPEN_INCONSISTENCY warning naming both sides and the command that resolves it
review List or resolve INCONSISTENCY particles (--action PREFER_A \| PREFER_B \| BOTH_VALID \| DEFER \| DISCARD; --bulk applies one action to all pending). Every non-DEFER resolution retracts the wrapper, so resolved conflicts leave the queue; BOTH_VALID / PREFER_B recover a quarantined losing claim as a new ACTIVE particle. DISCARD retracts both claims with no trust statement when neither is worth keeping; --bulk DISCARD lists every conflict and asks before it acts (--yes skips the prompt). An action that would keep a claim it cannot restore is refused and writes nothing: PREFER_A when claim A is no longer active (a conflict verdict does not undo a retirement made for another reason), PREFER_B when claim B is neither active nor quarantined. --bulk reports those records as refused. See Operator Guide → Lint and review.
curate The unified, finite, leverage-ranked curation queue. The bare verb prints a short batch of cards, headed "N of M open cards" so the batch is never mistaken for the backlog: each composes an existing finder (lint staleness / retraction-cascade / broken-provenance / confidence-decay / recency-decay (carded) / contradiction / no-subject, one card per open INCONSISTENCY record (an open conflict), the contested digest, links suggest duplicate candidates (one card per connected group of them), corpus links suggest URLs, and failed snapshots) into one card. Each card in the listing states the question it asks, quotes the beliefs involved (with id, effective confidence and subjects), shows the other side of a contradiction or INCONSISTENCY in the A/B order particles review uses, carries the LLM judge's verdict on a duplicate pair when one ran, and says what each offered gesture would do to that card. Cards are ranked by leverage, the card's urgency (its kind, age and dependents) scaled by its stakes, meaning how often sessions use the beliefs it touches, so a card about beliefs nobody uses ranks low (curation.stakes). A belief that feeds a configured documentation-projection manifest (curation.projection_manifests) gains projection-blocking leverage so the queue surfaces it first; fixing a claim a generated doc depends on is high-value (inert until a manifest is listed). --limit N overrides the session size, --kind K restricts to one card kind, --semantic runs the LLM-assisted finders; a contradiction card appears only once a second reading on llm.verification confirms the probe's flag, as in particles audit (audit.verify_contradictions). The card collection is served from a persisted snapshot rather than re-running every finder per invocation; on a ~32k-particle store that was 172 s a call and is now 60–86 ms. The collection is built by the nightly memory consolidate cycle or by --refresh (which forces a store-wide rebuild of the structural cards; slow). A refresh without --semantic runs no contradiction probe, so the contradiction cards carry forward from the last census instead of being dropped, and a stale header names that census's date; --refresh --semantic re-probes them. a store with no collection yet is served live at the old speed and says so in the header, because a read never writes the cache. --no-snapshot bypasses the cache for one invocation. Suppression, belief status, post-build gesture resolutions, ranking and briefs are all re-evaluated live on every read, so a card you resolved at 09:00 never comes back from an 03:30 snapshot; what is up to a day old is the detection itself, and the header line says when the collection was built. curate apply <gesture> <key> dispatches a card's gesture onto the existing write surface: affirm / snooze / dismiss / retract / merge / split / deposit / assign-subject (the last with --subject <id-or-name>; it links the subject in place, so the belief keeps its id) and relink (the gated_subjects card: every subjectless belief whose withheld names subjects relink-gated can recover, as one card) execute directly (with --reason / --days), and so does supersede: curate apply supersede <key> --content TEXT --reason TEXT --confidence F retires the card's belief and asserts the corrected one under operator authority, the same write POST /particles/{id}/supersede makes. The successor keeps the predecessor's subjects unless --subject (repeatable) replaces them, and the --reason text is deposited as its source unless --source TEXT or --corpus-entry ID names one; --confidence is required. The new belief is the operator's: attributed to curation.operator_identity (default operator:local) as HUMAN_REVIEW, with no agent confidence ceiling, and the operator may later correct it again. Like particle retract, it is not gated on mcp.write.enabled_stores. resolve (on an open-conflict card) settles the record through particles review's own resolution with --action and an optional --note: the card offers only the actions that can do what they say, so PREFER_A is withheld when claim A is no longer active and PREFER_B when claim B can no longer be restored; DEFER records a note and leaves the conflict open. An open conflict cannot be affirmed or dismissed, only resolved or snoozed. A demotion card shows a claim a later claim retired as its replacement, beside that replacement; affirm rules the replacement right and dismiss rules that both hold. Neither changes a status, and each appends the ruling to demotion-rulings.jsonl in benchmark.runs_dir as a labelled pair the benchmark rot probe arm scores (benchmark.record_demotion_rulings turns it off; see Lint and review). Subjectless beliefs no relink recovers are grouped by source: a source with two or more of them is one subjectless_source card. Its dismiss rules that those beliefs can stand without a subject, and a later one from the same source is asked about again. Each belief keeps its own no_subject:<id> key for assign-subject, supersede and retract; the queue previews five beliefs per card, and curate --card KEY (HTTP GET /curation/cards/{key}) lists every one with its key. Duplicate candidates are grouped: the finder's pairs that share a claim, directly or through a chain, are one duplicate_group card, which asks which of its beliefs are the same claim and names an elected survivor (subject-linked first, then the claim read first). merge --members IDS links the members named to one hub as co-evidential, every belief staying active, with --keep ID to name the hub; split --members IDS rules the members named a different claim from the rest, so the two sides are never grouped together again; dismiss rules that no two members are the same claim. Members are named by id or id prefix, or as all on a group of ten or fewer; a larger group's queue entry previews six members, and curate --card KEY lists every one. A merge is refused across a recorded conflict or an earlier split or dismiss. An answer shows whichever linked member ranks highest for the question, so name only members that state the whole claim and split off one that states less. --kind duplicate_pair selects the groups, and an older duplicate_pair:<a>|<b> key still applies. A candidate pair whose two claims each name a digit-bearing identifier the other lacks (1.114.1 against 1.114.2, PR 284 against PR 288) is withheld before grouping and before the judge, since such a pair is almost never one claim. Formatting does not count (v1.70.0 and 1.70.0, 1M and 1 million agree), and a claim that only leaves an identifier out is still asked about. Nothing is written; the header says how many pairs were withheld, and curation.identifier_cross.enabled: false carries them all again at the next build. Over HTTP the three gestures are POST /curation/duplicate-group. curate apply comment is kept as an alias of resolve. edit / reindex surface the resolving command. curate --precision reports how often the queue was right: per card kind over a window (--since YYYY-MM-DD, default curation.precision_window_days), the cards acted on, dismissed, snoozed and never touched, the denominator, and precision as acted over the cards ruled on, with what acted and dismissed mean for that kind; read from the gesture log at request time, nothing stored, --format json for the report and --kind to narrow it. The same block appears in particles quality and GET /quality. The queue is also exposed over HTTP as GET /curation on the remote engine, with the same limit / kind / semantic / no_snapshot parameters, returning {cards, count, open_count} plus the staleness stamp (built_at, age_seconds, stale, scope, per_kind_scope, kind_as_of, collection_size, and withheld, the duplicate candidate pairs each withholding rung kept out by stamp, null for one switched off; a kind whose finder did not run is carried in per_kind_scope, and kind_as_of gives the date its finder last ran). Each card also carries its kind's title and question, briefs with the belief's source_uri and asserted_at, and, on an open-conflict or contested card, conflict (both sides of its INCONSISTENCY as briefs a and b, plus a census record's further_a / further_b), with resolve_actions on an open-conflict card; POST /curation/rebuild is the HTTP mirror of --refresh; the operator-scoped curation writes (affirm / snooze / per-particle supersede / retract / subject-assign) are exposed over HTTP for the curation PWA. In remote mode (engine.base_url set) the listing, --card and --refresh run against the engine over those routes, while curate apply and --precision are refused until the engine has a route for them.
audit First-run memory audit: the agent-memory rot census: particles audit <memory-dir> harvests the directory (or a single file) into your real store, extracts it, and renders complete per-class counts with leverage-ranked exemplars: potential contradictions (probe + extract-time contested), likely-duplicate belief pairs (links suggest REPORT candidates; --judge upgrades to LLM-verified), probably-stale facts (expired valid_until + age decay + confidence decay), each class ending with its next verb (review, curate --kind …, links suggest --judge, deposit <url>). Composition only: no new detection, thresholds stay with their finders. The cost estimate always prints before extraction, with a dollar range (expected and ceiling) at the configured model's list price from llm.price_per_mtok, or tokens only for an unpriced model; above audit.confirm_call_threshold calls it asks, repeating the range (--yes pre-confirms; non-interactive aborts); --estimate prints and exits without depositing. --transcripts <dir> opts in session transcripts (capped at audit.transcript_max_entries, newest first; --max-entries overrides). The contradiction probe is bounded: capped at audit.max_contradiction_probes LLM probes, and a harvest run probes only pairs touching this harvest's beliefs by default; --scope store opts into the store-wide set. Under the cap, candidates are consumed in two tiers: intra-harvest pairs (both sides from this harvest) first, mixed harvest↔store pairs second, highest similarity within each tier, so a populated store's coincidental cross-pairs can never starve the harvest's own pairs out of the budget; a binding cap is disclosed as "probed X of Y candidate pairs" with the tier split, and the --judge duplicate pass consumes its in-scope pairs in the same two-tier order. Bare particles audit re-audits the existing store without harvesting: always store-wide, still capped (no key → structural finders still run, contradiction check skipped: no API key disclosed). A skipped contradiction check marks the report INCOMPLETE in its first line and exits 1; exit codes match memory consolidate: 0 complete, 1 report written but incomplete, 2 did not start. --format json carries complete. --output FILE writes the Markdown report; --format json dumps the model; --store <handle> targets a named store. Idempotent against the hook harvest through corpus dedup; with the MEMORY.md projection enabled, a successful run finishes by re-rendering the memory-index region. The audit also runs as the closing step of init claude-code. See User Guide → Claude Code memory.
reindex Re-extract stale or failed entries. Scopes: --entry-ids, --extractor-version / --extractor-id (after an extractor upgrade), and --provider-model <provider:model>, which re-extracts everything one LLM pairing produced, the handle for undoing an uncalibrated provider swap. The pairing is matched exactly, so openai:gpt-5.6 does not select openai:gpt-5.6-luna; particles with no recorded pairing (deterministic extractors, direct assertions, anything minted before the stamp existed) never match. The scope unit is the snapshot, so a snapshot whose particles came from more than one model is re-extracted in full. The scopes combine by intersection: --entry-ids with any of the particle-matching flags reindexes only the named entries that also match, and reports any that don't; naming entries can only narrow, never widen (before this, every other flag was silently discarded). --no-failed applies to auto-discovery only, since a named entry always resolves to its latest COMPLETE snapshot. Every run prints an upfront work plan (entries / snapshots / particles in scope, plus any snapshot whose archived blob is missing: known to fail, listed up to 5 with the rest summarised as a count) before the first LLM call; --dry-run prints the plan and exits without extracting (zero LLM calls, zero writes). Output is a short human summary by default (the plan, the capped blob list, final counts); --format json emits the full result envelope including the per-snapshot snapshot_plans detail. On a terminal the liveness line shows per-item position (snapshot 12/89 (entry 0a8fb1a9…) — 3 failed) as each snapshot completes, so remaining work is estimable from the plan's total. --estimate (with --extractor-version) measures what a version bump would change before the sweep runs: it re-extracts a seeded sample of the snapshots the sweep would re-run, writes nothing, judges each sample's new claims against its stored ones with the curation duplicate judge, and reports the share of changed snapshots with a 95% interval, the projected count across the scope, and the projected cost of the full sweep. The share is an upper bound, because re-extracting unchanged text also varies from run to run. It prints the free plan first and asks before spending; a non-interactive run needs --yes and otherwise exits 2 having spent nothing. --sample-size and --seed override reindex.estimate_sample_size / reindex.estimate_seed, and the sample's spend is recorded like any reindex run. Local store only. Each extraction also records which prompt sections, chunking path, vision channel and subject gate it exercised, with a hash of each one's text; --only-changed-components will use that record to re-run only the snapshots a bump could change, and is refused until a version bump has run over a store that carries the record.
structure Backfill the derived structured-claim annotation: one subject-predicate-object triple beside a particle's prose, for exact relational lookup and deterministic contradiction checks. Particles extracted since landed get theirs for free at extraction time (one more field in a reply already being paid for); this verb annotates the ones that predate it, at one LLM call each; hence --rate-limit-per-minute and a resumable --limit. --dry-run reports the whole backlog (never the batch cap), the runs it implies, and current coverage, and writes nothing; --structurizer-version <old> regenerates annotations stamped with a superseded version (mirrors reindex --extractor-version). It can only write the annotation: a claim's content, confidence and provenance are untouched, and a particle whose prose has no honest triple is skipped permanently and without complaint; absence is a legal state, and coverage is reported by particles quality, never enforced. Local store only.
validity Date claims from the absolute dates already in their prose: for each ACTIVE claim with no valid_from, one anchoring date behind a recognised cue sets the start and the cue fixes the kind: on <date> a moment (EVENT), since / from <date> a span (STATE), as of <date> a span known to hold at the date with its start unknown, in <year> / in <month> <year> an act somewhere in that unit (EVENT, read as within any window the unit meets). A claim with two dates, or a date behind no listed cue ("in the week before", "a session dated"), is skipped and counted; the session's own date is never used. No model call. A value the extractor stated or particle date set is never overwritten; a default from an earlier cue rule is regenerated (each value carries the rule's digest). --dry-run reports the scope, what the rules would set, and the coverage census; --limit caps a run, which commits as it goes. Local store only. The window route (query --during) reads what this writes.
modality Regenerate stale adjudicability defaults. Each claim's assertion_modality is stamped with the classifier rule that set it (the extraction prompt component and its content hash); when the rule has changed since, particles lint reports MODALITY_CLASSIFIER_STALE. This verb runs today's rule over each stale ACTIVE claim, one LLM call each, and rewrites the value and its stamp. It never makes a claim adjudicable on its own: a verdict that would flip a claim to FALSIFIABLE is queued and reported by particles lint as MODALITY_GRANT_PENDING, for particle reclassify. Journal-extractor claims are skipped and left to re-extraction. --dry-run prints the backlog and the census by state and classifier; --limit / --rate-limit-per-minute default from modality_regeneration; --include-unclassified also classifies claims no classifier ever ran on. It never touches content, confidence or provenance, never overwrites a particle reclassify verdict, even one recorded mid-run, and writes nothing when a reply carries no valid verdict. Claims whose value changed are recorded in one MODALITY_RECLASSIFIED event and re-paired by the next consolidation run. Local store only.
episode Read whether transcript claims report only their session's moment. The question is asked of a claim every source of which is a curation.session_source_types entry (default CONVERSATION): session_bound for a state at the session's moment or an act performed in it ("PR #447 is open", "the version was bumped from 1.114.1 to 1.114.2"), standing for one that holds beyond it. The extractor answers it for new claims; this verb answers it for stored ones, several claims of one transcript per call, each beside its source passage, and stores the answer as extraction:episode with the stamp of the prompt that gave it. --scope cards (the default) reads the sides of the newest curation collection's pair cards; --scope all reads every transcript-only claim. --dry-run reports the backlog, the calls it needs and their list-price estimate for this run's --limit and for the whole backlog (an upper bound: every passage at full length, each call's thinking at curation.episode.estimate_thinking_tokens); --restamp rewrites readings under any other stamp. A reading's stamp names the prompt and the model that served it (regen.episode@<digest>~anthropic:claude-sonnet-5-5), so readings by two models are admitted apart, and a reading by a model other than the one extraction resolves to is read again unless its stamp is admitted. --sheet PATH writes the owner's labelling sheet instead (JSON Lines: per stratum and stamp combination, a sample of the pair cards a reading would fold, each with an empty label). No reading withholds a card yet: each curation build and consolidation run only counts, in shadow, what would fold into one card per session, shown by particles curate. Never touches content, confidence, status or provenance, nor an operator's reading. Local store only.
reconcile Cross-entry document-supersession sweep: demote superseded claims the intra-entry extract never reconciles. --dry-run reports without mutating; --verbose prints per-demotion progress. Demotion-only (the loser stays auditable as PROVENANCE_STALE / DOCUMENT_SUPERSEDED); single-trust-order stores only. Run after depositing an ADR/spec corpus (incl. its superseded documents) to select current truth before a projection. --updates runs the same-subject update sweep; a pair whose probe already answered no is not asked again while both claims are unchanged, and the summary's previously_cleared counts those skips. Pairs are probed by content cosine, highest first, under consolidation.max_update_probes; the summary's cap_reached, not_reached and ordering say whether the cap stopped the sweep, how many qualifying pairs it left, and in what order it went. The paraphrases pass follows the sweep, retiring the other phrasings of each value an update replaced, from the nightly cycle's position without moving it; its report is the summary's paraphrases block. --dependents runs the re-anchor pass: a claim that relied on a state an update retired, such as a place described as a walk from the user's old flat, is replaced by a dated restatement anchored to that state. It resumes from the nightly cycle's position without moving it; --scope store examines every update retirement. Refused in remote mode (engine.base_url set); run it on the engine host.
interchange Export/import/restore a portable store bundle: interchange export -o <dir> [--store H] [--format jsonl\|yaml] writes manifest.json + particles.<ext> + subjects.<ext>; --format jsonl (default, one unit per line) or --format yaml (human-editable YAML-LD, same data model, MUST round-trip); interchange import <dir> [--store H] imports it (each particle reconciled through §6.6, fresh ids; only ACTIVE units are admitted, the rest are set aside and counted per status, and an admitted unit's status reason is cleared); interchange restore <dir-or-file> [--store H] faithfully reconstructs the bundle's own store into an empty target with origin ids preserved and no reconcile; refuses a non-empty store. A bundle is untrusted on both paths: a record naming a Particles server identity, the memory-server migration tag, the re-anchor pass, an operator's or an agent's calibration, or a corpus entry or particle the target already holds is kept as attribution (a re-stamped asserter, a prefixed tag or id, IMPORTED calibration), and the run counts each kind. restore --trust-bundle restores those marks as written, for a bundle you exported from your own store. Import/restore auto-detect the container from the member extension, so either format round-trips with no flag. Subjects travel by external reference; units carry the canonical substrate only. All three subcommands are refused in remote mode (engine.base_url set); run them on the engine host.
subjects List, search, inspect, alias, accept, confirm, unlink, merge, split, delete, gc, set-class, fix-labels subjects (canonical entities). A Subject an agent principal minted for a name the store did not know is provisional: extraction, imports and operator writes do not resolve the name to it, and every read marks it. list --provisional lists them oldest first, each with any confirmed Subject that holds its name; accept SUBJECT_ID confirms one (POST /subjects/{id}/accept); provisional-backfill [--dry-run] marks the Subjects agent principals minted before the mark existed that no one else depends on, and the dry run only counts. search QUERY matches a substring of a subject's name or of any recorded alias, and names the alias when the name did not match. show, query --subject and links --subject take an ID, an ID prefix, or a name or alias, and refuse a reference that matches more than one subject. rebuild-aliases [--check] re-derives the alias index that search and name lookup read from the recorded aliases; --check changes nothing and exits 1 when the index differs. unlink SUBJECT_ID NAMESPACE:ID drops a wrong external-reference binding while leaving the subject + particles intact. merge SOURCE_ID [SOURCE_ID …] TARGET_ID [--dry-run] [--yes] folds one or more Subjects into the last-named target in one pass: it lists each source with the particle links it moves and the aliases the target gains, asks once (--yes skips the prompt, --dry-run stops after the listing), then re-points every link, adds each source's names to the target as aliases, deletes the sources, and records one SUBJECTS_MERGED event whose payload names every source and the target. A source's artifact refs in the target's project move to the target, so the next transcript that names the source's spelling finds the target; the listing names each ref it carries and each it drops as another project's. Every source is checked first, so a source that is the target, is listed twice, or was already merged refuses the whole merge and nothing is written. Mirrored by POST /subjects/merge (source_ids, target_id, dry_run). split SOURCE_ID --particle PID [--particle PID …] (--new-name NAME \| --new-external-id NS:ID) [--dry-run] re-binds some particles off a misjoined source Subject onto a new Subject the resolver canonicalises against the available external KBs. find-duplicates reports candidate-duplicate subject pairs by name/alias embedding similarity (review, then merge). list --phantoms-only restricts the listing to phantom subjects, those with zero ACTIVE particles. delete SUBJECT_ID [--force] removes a phantom subject (refuses a non-phantom one unless --force, then detaches it from any ACTIVE particles). gc [--dry-run] (alias prune-empty) sweeps every phantom subject in one pass, the bulk cleanup after split/merge churn; --dry-run lists what it would remove without committing. set-class SUBJECT_ID CLASS overrides the resolver's Nomisma class (e.g. nmo:NumismaticObject) when it mis-classed an entity; records a SUBJECT_RECLASSIFIED operator event and is a no-op when the class is unchanged. relink-gated [--tier N …] [--sample N --seed S] [--apply] links beliefs that have no subject to the files, records, identifiers and CLI commands the extraction gate withheld from them, as Subjects scoped by the source's project. Names are recovered only from what each belief carries, in tier order: 1 its extraction:gated_subjects record, 2 its structured claim's subject term, 3 its backtick spans (subject_gate.relink_tiers sets the default). A belief whose source has no project, or several, is left alone. It reports without writing unless --apply is given; --sample prints reproducible example links for a precision check before a tier is accepted. The links are written in place, so no belief is superseded, and one SUBJECTS_RELINKED event records the run. fold-artifacts --repo DIR [--namespace KEY] [--apply] folds the other spellings of a file into the Subject for its path from the repository root: an absolute or worktree path, a bare filename (codec.py), a partial path (ingest/pipeline.py) and a dotted module name (particles.config). Bare and partial names fold only when exactly one file of the checkout's git ls-files ends in them, and a module name only when its .py or __init__.py is in the checkout and its last segment is not a file extension (particles.db is the store file, not the module). Every candidate left alone is listed with its reason. The listing shows each Subject's claim count and date range, so a file renamed since a transcript can be spotted. It writes nothing unless --apply is given, which merges each fold as its own SUBJECTS_MERGED event; fold-artifacts --undo EVENT_ID reverses one fold exactly, restoring the source Subject, its names, refs and links. Without --repo, --namespace KEY folds absolute paths only. fix-labels renames subjects whose name is a raw Wikidata QID, and re-fetches every cached Wikidata label equal to its own id (a label an outage may have saved), clearing the ones Wikidata still cannot answer.
particle show Inspect a single particle (content, status, confidence, subjects, source, context fingerprint). It also lists the narratives a particle is PART_OF and, for a NARRATIVE, its constituents in sequence
particle search --fingerprint <hash> List particles sharing a context fingerprint
particle source <id> Show the source passage a particle was extracted from, re-derived from the stored snapshot and labelled exact (hash-verified chunk), located (best term overlap; not verified), or whole source. Passage on stdout, metadata on stderr. query --show-source prints the same for a query's top hits. Display only: never a ranking input
particle narrative <id> Show a NARRATIVE particle's constituents in SEQUENCE_IN order. Add --synthesize to render it as one cited prose article instead; falls back to a deterministic cited listing with no API key
particle tag <id> --tag <path> Apply one or more taxonomy tags to a particle in place; --force allows tags outside any active taxonomy
particle untag <id> --tag <path> Remove taxonomy tags from a particle
links add p:abc p:def Create a typed link between two particles: --type co-evidential (default), part-of, or sequence-in. part-of / sequence-in are directional (A → B) and build narratives
links remove p:abc p:def Remove a typed relation between two particles
links list p:abc Show direct relations and the transitive co-evidential group for a particle. --kind <kind> filters the listed relations to one relation kind (e.g. part-of, endorses; case-insensitive) and skips the co-evidential group section unless the kind is co-evidential
links suggest --subject <id\|name> Propose co-evidential candidate pairs within a Subject (or --all); the curation workflow that replaced the L-IDX-01 lint check. --llm-judge adds per-pair PARAPHRASE/DISTINCT/UNSURE verdicts; --apply (needs --yes past the confirm threshold) auto-links the PARAPHRASE pairs. See Operator Guide → Co-evidential curation.
links dedup Merge identical-content duplicate beliefs into one survivor: exact content equality under the same normalized key extract-time suppression uses (whitespace runs and a trailing period absorbed; wording and case preserved), no similarity threshold and no LLM call, so every near-duplicate stays advisory under links suggest. Read-only by default: it reports the groups and redundant-copy counts and writes nothing. --apply merges (links each redundant copy CO_EVIDENTIAL to the survivor and supersedes it with DUPLICATE_MERGED; never deletes, never mutates the survivor) and refuses unless links_suggest.auto_merge.enabled: true is set in config.yaml. --subject <id\|name> scopes to one Subject; --output-format json for scripting. --reread works instead on reworded copies of one passage of an append-only source (a transcript read twice before 1.166.0): a read-only census with a cost estimate by default, --judge asks the duplicate judge and the update reading and records their answers (paid; asks first, --yes skips), --sheet <csv> writes the SAME verdicts for labelling, --labels <csv> scores them against the admission bar, and --apply merges from the recorded answers with no model call, only on the strata links_suggest.reread.admitted names. See Operator Guide → Co-evidential curation.
links unmerge <event-id> Revert an exact-duplicate auto-merge, the one-command undo for links dedup --apply. The retained copies return to ACTIVE keeping their ids (so merge ∘ unmerge is the identity), only the merge's own EXACT_DUPLICATE (or, for a --reread merge, REREAD_DUPLICATE) links are dropped, and the survivor is never touched. Copies that moved on since the merge are skipped and named rather than restored, so one drifted row never blocks recovery of the rest. Prints the full blast radius and asks before writing (--yes pre-confirms, --dry-run plans only). --run <run-id> reverts a whole merge run; --since <ts> [--until <ts>] is the migration path for merges recorded before run ids existed. Local-only, and deliberately not gated on links_suggest.auto_merge.enabled; that flag authorizes merging, so the undo must outlive turning it off. See Operator Guide → Co-evidential curation.
trust Source trust policy: trust set <pattern> <score> (domain baseline or --modifier URL-pattern delta), trust list, trust show <uri> (resolved score), trust statement-set <domain> CORPUS_ENTRY\|SOURCE_TYPE\|AUTHOR <ref> <rank> (scoped SourceTrustStatement, four-tier first-match-wins cascade), trust set-entry <entry_id> <rank> (per-entry override convenience that validates the entry and infers its domain; --domain to override), trust cascade (re-run trust resolution). Since the resolved rank bites at query, export, and federated-query time, not just at §6.6 conflict time. See Operator Guide → Tuning.
trust lens Shareable trust-policy lenses: publish by depositing a TrustLensDefinition JSON (particles deposit lens.json), then trust lens list / show <name> / adopt <name> / unadopt <name>. An adopted lens composes into query/export-time effective confidence under local-wins / most-skeptical-across-lenses.
vocab Vocabulary documents: a store's reviewed predicate rulings, kept as a versioned JSON-LD document others can import. vocab create <name> --prefix <p> --namespace <iri> mints version 1 under an IRI base you control. vocab propose <name> reads the store's structured claims about classed subjects and suggests alias candidates (forms the local encoder places together on one class, never joining to with from or a negated form with a plain one) and profile candidates (canonical predicates a reviewer may give a slot kind); --dry-run reports without recording, --json writes every candidate. vocab proposals lists what awaits a ruling; vocab confirm <key>… publishes the next version with the rulings (--kind timeless_single\|one_at_a_time\|many_at_once for a profile, --past <form> for a form that names the slot's old value), and vocab decline <key>… records a no that is never proposed again. vocab align <name> <term> <property> --match equivalent\|exact\|close --basis … maps a term outward, to wdt: or schema: for example, without renaming it. vocab export / vocab import carry a document between stores, vocab adopt puts it in force (--lens <name> limits it to while that trust lens is adopted), and vocab show / vocab list inspect. A document is a prior the update step reads once adopted; it never gates extraction.
events list Read the operator event log, the append-only audit of operator decisions (retract / split / merge / alias / confirm / unlink / trust / review / links / tags). Filter with --particle / --subject / --entry / --type / --limit, or by the HTTP caller that wrote the event with --principal / --key. Mirrored by GET /events and the read-only MCP events_list tool. See Operator Guide → Auditing operator actions.
events show <id> Show one operator event in full: header, refs, and payload. Mirrored by GET /events/{id} and the MCP event_show tool.
extractor conform <extractor-id> Run an extractor against the conformance fixture corpus and report per-field PASS/WARN/FAIL. Scores the fixtures the registry routes to that extractor; --all-accepted widens the run to every fixture it accepts(), a deliberate probe that never updates the stored verdict
extractor generate-fixture <entry-id> Turn a deposited corpus entry's latest snapshot + blob into a conformance fixture skeleton (manifest.yaml + content.bin + snapshot.json) and register it in MANIFEST.yaml. expected_acceptors is left empty to fill after verifying coverage. Supports --id, --source-type, --output-dir, --force. Adding a fixture invalidates prior conformance reports (corpus-hash change)
extractor benchmark <extractor-id> Run an extractor against bundled benchmark suites and report precision / recall / calibration_error (supports --suite, --judge embedding\|llm, --fail-on). --runs N repeats each suite N times and reports mean ± spread per metric instead of a single noisy point estimate (--fail-on then reads the mean); it costs N× the LLM calls, so it prints a cost projection first (input and output tokens for the extraction model, priced from llm.price_per_mtok, beside the measured usage of the last saved run of the same suite and pairing) and confirms above benchmark.confirm_call_threshold; --estimate prints and exits, --yes pre-confirms. Each run's report is also persisted as a JSON file under benchmark.runs_dir (default ~/.particles/benchmark/runs/), stamped with the resolved extraction provider:model pairing, so provider comparisons and calibration series survive the terminal session; --no-save skips it
extractor benchmark-compare --extractor-id A --extractor-id B Run two or more extractors against the same benchmark corpus and emit a suite × extractor matrix per metric (supports --suite, --judge, --threshold, --format table\|json)
extractor benchmark-modality <extractor-id> Measure assertion_modality classification quality for a genre extractor against modality suites under tests/benchmark/modality/: per-modality precision/recall, the dangerous false-non-FALSIFIABLE rate the journal default raises, and the whole-entry narrative-emission rate (under the framework; integration-tier, so it drives the extractor's LLM call). Supports --suite, --judge embedding\|llm, --threshold, --format table\|json
extractor benchmark-polarity <extractor-id> Measure claim-polarity classification quality (ASSERTED / DECLINED / HYPOTHETICAL) for the general extractor against polarity suites under tests/benchmark/polarity/: the dangerous wrong-DECLINED rate (a real decision wrongly hidden from the default surface), its wrong-hidden superset, and per-polarity precision/recall (under the framework; cap. 1; integration-tier, so it drives the extractor's LLM call). Supports --suite, --judge embedding\|llm, --threshold, --format table\|json
extractor benchmark-validity <extractor-id> Measure event-anchored-validity quality for the general extractor against validity suites under tests/benchmark/validity/: the dangerous wrong-expiry rate (a durable fact wrongly assigned a valid_until and thereby set up for silent retirement by the §9.3 staleness lint, the over-eager-expiry failure mode), plus existence precision/recall of correct date-bounded extraction and date accuracy (under the framework; integration-tier, so it drives the extractor's LLM call). Supports --suite, --judge embedding\|llm, --threshold, --format table\|json
extractor calibrate <extractor-id> Fit a temperature-scaling calibration for an extractor over the calibration suites it is the production routing choice for: tests/benchmark/calibration/, whose gold sets are deliberately partial so the fit sees both labels (for the suite filter). Stored per (extractor, provider:model) pairing, so a provider swap keeps each model's own calibration. Supports --suite, --suites-dir, --fixtures, --judge, --dry-run, --regenerate. Unlike extractor benchmark, --judge defaults to llm: the calibration label is the equivalence judge's verdict, and a well-behaved extractor's only unmatched emissions are the judge's paraphrase misses, so with the embedding judge those misses are not noise around the signal, they are substantially all of it (measured over prose-calibration-001, the fitted T moved 0.2486–0.7418 across runs of identical inputs and the persist/refuse verdict flipped with it). The LLM judge is consulted only in the contested [0.65, 0.80) band, so the extra cost is bounded; --judge embedding restores the cost-free, noisier labelling. The judge is printed beside the label split, because two fits are only comparable when it matches. Warns when another stored pairing for the same extractor is suite-stale; the guard is per pairing, so this run neither re-fits nor retires it. Prints the fit's label split and fittable population, and refuses to persist a fit on degenerate labels, one that lands on an optimizer bound, one with fewer than two distinct movable confidences, or one that does not reduce calibration error. It also scores the fit on every recorded extractor benchmark run for the same extractor, extractor version and pairing, and refuses one that raises their calibration error or that has no such run to check against; the check reads files and makes no API call, and the persisted record carries its held-out figures. The record is stamped with the extractor version it was fitted under, the same version the held-out check matched runs on, and applies only while that version is running; the guard against overwriting an existing record says when that record is already not applied
extractor calibrations <extractor-id> List the stored calibrations for an extractor, one per (provider, model) pairing, and flag any whose suite set is stale, fitted over suites that differ from the ones the extractor auto-matches today, so the fit answers a question it is no longer asked. Derived from the record's own benchmark_suite_id; needs the benchmark suites, so an installed SDK (where tests/ is not shipped) prints the listing unannotated. --suites-dir overrides the suite directory. Each applied record also shows its held-out calibration error, or is marked as never checked out of sample when it was persisted before that check existed. A record fitted under another extractor version than the one running, or under an unknown one (every record persisted before v1.169.2), is listed as NOT APPLIED (fitted under 0.15.0, running 0.16.0): the pairing mints EXTRACTOR_DIRECT until it is re-fitted with --regenerate or retired
extractor calibration-forget <extractor-id> <provider-model> Retire one stored calibration record, the counterpart to extractor calibrate, for a record that cannot be re-fitted because its model is no longer reachable. Prints the record and confirms; --yes skips the prompt. That pairing returns to calibration_source=EXTRACTOR_DIRECT for particles minted afterwards; particles already stored keep the confidence they were minted with; particles reindex --extractor-id <id> re-mints them
benchmark memory Run the agent-memory system benchmark: LongMemEval against the whole pipeline (deposit → extract → reconcile → query), not a single extractor (its own benchmark group, deliberately not under extractor). Reports four conditions in two labeled families: retrieval-stage Recall@k / Precision@k scored through provenance chains, and end-to-end QA accuracy for qa_particles vs the qa_full_context / qa_no_memory baselines under one pinned answer model (llm.benchmark_answer; judge on llm.benchmark). Estimate/confirm cost gate (--estimate, --yes); dataset downloaded on demand at a pinned revision with SHA-256 verification. Supports --limit N/--all, --variant oracle\|s\|m, --types, --format table\|json, --output, --store-dir, --dataset-file. See the benchmarks documentation.
benchmark observer The two-project observer fixture (gate B): two repositories' memory files, sharing generic subjects, evolve over --days and are harvested into one scratch store through the real pipeline with scripted extraction and a scripted contradiction probe (zero LLM calls). Each day every line a project currently states is checked through that project's observer: in view, or retired by cross-project supersession, the generation cascade, or a surviving particle attested only by the other project (active_elsewhere, the lens's own cost). --seed (repeatable; default 1–8), --days (14), --output, --format markdown\|json, --store-dir keeps the scratch stores. The number claude_code.observer_scope's default is decided against; write-up in Benchmarks → Project observer scope.
benchmark rot door run Compare other agent memories on the memory-rot world. Each memory is built fresh, written in time order through its own write path, and asked every probe through its default door; only the text the door returns is scored, with the rot classifier over line and sentence segments. Competitors run through adebench's own adapters from a pinned clone named in an arms manifest (benchmark_rot.door_manifest); Particles runs in an isolated child behind its MCP query tool; raw-chunks and recent-mentions are zero-cost baselines. --tier quick (default) uses a six-attribute world on seed 42 and caches competitor builds, standard the full world on the development seeds, milestone committed held-out seeds (--held-out, --freeze) with three builds per model-backed memory. --estimate prints the projected builds and spend; every paid build asks unless --yes. --particles-scripted is a free plumbing run, --replay-extraction DIR replays Particles' extraction for a read-side change. When the manifest names a [reader], a pinned reader model then answers from every door and the reply is scored; --no-read skips it, door read reads a saved report, door reader-floor counts the reader's verdict flips between two reads. door rescore, door seeds, door freeze, door label-sample, door label-score, door label-replies and door label-replies-score sit beside it.
benchmark relevance-floor Measure the query relevance floor on real questions: how often the gate that skips the answer step refuses a question the store could have answered. harvest builds a private held-out set from your own agent transcripts (explicit memory queries plus typed questions, tagged apart, secrets redacted). The bare verb replays it against a store and reports the refusal curve over floors 0.10–0.40 with no LLM call; --judge answers each question with the gate disabled, labels the answer grounded-and-useful or not, and sweeps the answerable-but-refused / unanswerable-but-passed rates under both conditionings. Estimate/confirm cost gate (--estimate, --yes), priced from each question's real retrieved context, and a required spend ceiling (--max-usd for priced models, --max-calls or --no-ceiling for unpriced ones): a judged run without one refuses before any call, and one that reaches it stops, marks its report INCOMPLETE and resumes from its checkpoint under a higher ceiling; a judged run ends with a Spend: block on stderr, the estimate beside what the providers reported per role, which the JSON report records as spend; --replay-from reuses a saved replay; resweep re-renders a saved report over any floors for free. The table carries no question text; the held-out set and JSON report do, and are refused inside a git work tree without --allow-in-repo. Supports --limit N, --top-k, --store, --format table\|json, --output, --checkpoint. See the relevance-floor results.
benchmark leakage Measure model-prior leakage in query answers: the share of answer sentences the retrieved particles do not support, which is how a composing model's own background knowledge shows up in an answer with no record of where it came from. Each question runs through the query operation as configured; every sentence of its answer (split deterministically, markdown-aware) is judged against the particles the answer was composed from, by the same entailment judge abstraction promotion uses, on the llm.benchmark model. The judge must resolve to a different model from the composer (llm.query_response) unless benchmark_leakage.require_distinct_judge is off, because a model judging its own answers tends to find its own background supported. Sentences that assert nothing (lead-ins, remarks about the knowledge base) are counted apart; refused answers are never judged. Reports the pooled unsupported-sentence rate, per-source rates, the mean per-answer fraction, and the share of answers with any unsupported sentence. Questions come from the relevance-floor held-out set, or from --question (repeatable) for a per-question report. Estimate/confirm cost gate (--estimate, --yes) and a required spend ceiling (--max-usd for priced models, --max-calls or --no-ceiling for unpriced ones): a run without one refuses before any call, and one that reaches it stops, marks its report INCOMPLETE and resumes from its checkpoint under a higher ceiling. --checkpoint, --limit N, --top-k, --store, --format table\|json, --output. --calibrate-from <report.json> projects the judge calls from a saved run's sentences per answer instead of the configured assumption. Every run ends with a Spend: block on stderr, the estimate beside what the providers reported per role, which the JSON report records as spend. The table carries no question or answer text; the JSON report does, and is refused inside a git work tree without --allow-in-repo. See the leakage results.
benchmark trip-vs-move Run the trip-versus-move case end to end. --case reader (the default) is the reader's own wording: "I live in Delhi, but I'm in Mumbai for a week", then a month later "I moved to Mumbai". --case mid-trip is a harder, different case, where the move is announced the day after the trip note. Each run deposits the case's notes into a fresh scratch store with particles audit, consolidates it with particles memory consolidate --scope store, and checks the store with judge-free checks: alone, the trip leaves the Delhi home current and puts the user in Mumbai; after the move, no claim keeps the home in Delhi or reads the week as current, and the move is kept. Every run is a child process with its own HOME, store, blob directory and config, so nothing reaches your own store. Every purpose runs on one model: --model / --provider (default llm.default), or a stated mixture with --pin PURPOSE=MODEL. The defaults are the published protocol (--move-runs 3, --trip-alone-runs 2). An estimate prints before any call, every live run asks before spending (--yes pre-confirms; a non-interactive run without it exits 2), and --max-usd sets a per-run ceiling, checked against measured spend before each step. --no-same-slot-admits runs the gate before 1.187.0 and reproduces the failure the fix addressed. --arm scripted answers every model call from the package's table, free and key-free: a test of the harness, never of a model. --output writes the JSON report of record; --store-dir keeps the stores; rescore re-runs the checks over a saved report with no LLM call. See the trip-versus-move results.
benchmark update-gate Replay the registered update-gate pair sets (gate, gate held-out, past value, past marker) through the production probes: each pair is asked the contradiction probe and the update probe with its second reading, --samples times (default 3), and three gates are scored from the same samples: the production gate, the update verdict alone, and the gate before 1.187.0. Reports each set's registered bar on the production gate and whether that gate retires any control the older gate kept. No store is built. --set (repeatable), --model / --provider, --estimate, --yes, --format table\|json, --output; rescore re-scores a saved report with no LLM call. See the trip-versus-move results.
benchmark query-latency Measure query latency by stage and store size. run builds a seeded synthetic store per size (cached; --sizes, default 10k, 56k, 100k, 300k, 1M), then times the selection half of a query (retrieve_ranked: no answer generation, no LLM call) in cold cells (a fresh process per question, the encoder load timed apart) and warm cells (one process, --warm-questions), unfiltered and subject-filtered. Each query is split into setup, embed, SQL fetch, embedding decode, model hydration, filters, source lookup, support discounts, scoring, sort and co-evidential collapse, beside rows read, embedding bytes decoded and peak memory. Each cell runs in its own process and writes its own result under --work-dir, so a re-run skips finished cells; a cell that times out or trips the swap guard is recorded as a result. --no-encoder scores a fixed seeded query vector and loads no model. report renders the tables and the scaling slope (--format markdown\|json, --export-dir for one raw JSON per size). See the query-latency results.
conformance check Self-certify this implementation against the Conformance Profile (artifacts/conformance/profile.yaml), the behavioural/quantitative ground truth. --level L2 recomputes the deterministic vectors (effective confidence, recency, calibration, §6.9 noisy-OR) via the SDK's own functions; --level L3 checks the similarity bands + top-k under the live embedding profile (SKIPPED without the model); --level all (default) runs both. Exits non-zero on any FAIL; --json for machine output. Distinct from extractor conform (per-extractor field completeness).
conformance show Print the loaded Conformance Profile: version, float tolerance, reference embedding profile, constants, decay table, and formulas.
export obsidian <dir> Export the knowledge base as an Obsidian vault. Supports --with-synthesis to splice LLM-synthesised prose articles into per-subject notes; shares the input-hash cache with export wiki so running both pays LLM cost once per subject. With --with-synthesis it also emits one cited-prose note per NARRATIVE under Narratives/ (disable via obsidian.emit_narrative_notes: false). --invalidate-stale-links drops the article-cache hash from any note whose [[X]] wikilinks reference a renamed subject. The export records the notes it wrote in <dir>/.particles-export.json and only ever prunes or overwrites those, so it can share a vault with your own notes; the first export into a directory that already holds Markdown it did not write is refused unless --force, which also lets a note overwrite a file at its path.
export anki <file> Export per-particle flashcards as an Anki deck
export wiki <dir> Synthesise per-subject wiki articles with cited footnotes; supports --dry-run, --regenerate-all, --invalidate-stale-links, --subjects "A,B", and --without-synthesis to render every article as the deterministic structured listing: no LLM call, no ANTHROPIC_API_KEY, reproducible output. The export also emits one cited article per NARRATIVE under Narratives/ via the mechanism (disable via wiki.emit_narrative_notes: false; suppressed by --subjects, since narratives are subject-less). Cross-exporter --min-particle-confidence filter applies, as does --include-non-asserted (non-asserted prose is excluded from the rendered surface by default).
export jsonl <file> Dump every ACTIVE particle as JSON Lines (one full particle object per line) for analysis tools (jq / pandas / DuckDB). Cross-exporter --min-particle-confidence filter and --include-non-asserted apply. Distinct from interchange export: this is a flat data dump that excludes non-asserted prose by default, not the round-trippable JSON-LD bundle (which keeps everything).
synthesis-cache Inspect + prune the shared article-synthesis cache the prose exporters share: synthesis-cache list (index of cached articles), show <subject-id> (one subject's cached body + metadata), vacuum [--dry-run] (delete provably-unreachable rows: stale prompt versions + orphaned subjects), evict <subject-id> [--yes] (drop one subject's entries). Every subcommand is refused in remote mode (engine.base_url set); run them on the engine host.
export logseq <dir> Export the knowledge base as a Logseq graph. Writes pages/<subject>.md in Logseq's native bullet-outline format, with each particle emitted as a block whose id:: is the particle ID, enabling cross-page citation via ((<particle_id>)) syntax. Supports --with-synthesis, --invalidate-stale-links, --min-particles, --min-links, and --min-particle-confidence. With --with-synthesis it also emits one cited-prose page per NARRATIVE in Logseq's Narratives/ page namespace (on disk pages/Narratives___<slug>.md), plus a ## Narratives backlink block on each participating subject page (mechanism; disable via logseq.emit_narrative_notes: false). Shares the synthesis cache with export wiki and export obsidian. Keeps the same .particles-export.json ownership manifest at the graph root as export obsidian, so your own pages in pages/ are never pruned; a graph exported by an earlier release needs --force once, and its stale pages are left for you to remove.
export notion Notion exporter: the first API-target exporter: syncs the store into one operator-provided Notion database instead of the filesystem (no output path). Each subject becomes a database row (titled with its display name); particles become page blocks carrying effective confidence + status + a link to corpus provenance. Requires NOTION_API_KEY (mint an internal integration at https://www.notion.so/my-integrations and share the target database with it); the token is read from the environment, never a flag. --database-id (or notion.database_id in config) names the target; --dry-run reports the plan with zero API writes; --no-update-blocks is the create-only opt-out (otherwise re-sync owns the managed block range under a sentinel heading and is idempotent, keyed on the subject id stored in a page property). Cross-exporter --min-particle-confidence and --include-non-asserted apply.
export graph <file.html> Scoped epistemic graph view: one self-contained HTML file rendering a scoped subgraph: --subject <id> (one Subject's neighbourhood, --hops, clamped to graph.max_hops) --query "<q>" (one query's retrieval set, the picture of the knowledge a query consults), --inconsistency <id> (a contradiction's evidence: the INCONSISTENCY anchor + its disputants with their true statuses; full id or unique prefix), or --manifest <path> --section <name> (a projection section's deterministic selection). Scope is mandatory; a whole-store render does not exist, and the graph.max_nodes / per-subject panel caps disclose when they bind. Encodings: effective confidence as opacity (decay renders as literal fading), status as form (--history adds SUPERSEDED ghosts + successor chains, RETRACTED tombstones), contested badges with bases on hover, utility as node size. --as-of <T> renders the graph as believed at T; two exports at two instants make the static belief-history demo. Cytoscape.js is vendored + inlined: no CDN, opens over file://, air-gap-safe. --min-particle-confidence and --include-non-asserted apply. See User Guide → Graph view.
project <manifest> [output] Documentation projection: render a checked-in manifest (docs/projection/<name>.yaml) into a cited view of the store: each derived section's current-truth particles (ASSERTED-only, DOCUMENT_META / superseded excluded; §3) synthesised as clean prose via the article_synthesis engine, mechanical blocks spliced verbatim, in manifest order. --without-synthesis renders the deterministic, key-free listing (semantics); --check is the drift gate: it regenerates the deterministic <name>.snapshot.md and exits non-zero on selection / structure drift (prose drift is advisory, fork #3), needing no API key. --splice REGION writes the rendered prose between named <!-- BEGIN/END PROJECTED: REGION --> sentinels in an existing hand-authored file (self-hosting one section of an otherwise hand-written doc) instead of overwriting the whole file; on a manifest with per-section region: bindings it renders only that region's section (the single-region re-roll path). --splice-all splices every declared region in one pass: the N-region self-hosted document (the README's what-is / design-rationale / architecture regions); every derived section must declare a region:. --export-corpus writes the manifest's sibling <name>.corpus.jsonl drift-gate bundle: exactly the deterministic selection, in the interchange form the gate's ephemeral restore consumes. Beside it, <name>.sources.json records the repository file each bundled claim was extracted from and that file's digest at the time; --check and scripts/projection_drift.py then print an advisory line for each pinned claim whose source file has changed since, without ever failing the gate. --export-corpus refuses, writing nothing, when the store lacks a particle the manifest pins: the bundle is exported only from the store its corpus was built in. On the agent-memory manifest (~/.particles/claude-code/memory.yaml), --splice memory-index runs the SessionEnd hook's own render-splice cycle. Spliced bodies render [[wiki-links]] as plain text (the host is plain Markdown). The drift gate additionally hard-fails when a declared region's <!-- sources --> trailer in the shipped doc no longer matches the store selection, so a pin/store change forces a visible re-splice. Refused in remote mode (reads the whole local store).
import vault <dir> Walk an existing Obsidian vault (or any Markdown directory) and deposit every .md file as LOCAL_MARKDOWN for retrospective extract + lint (see § Onboarding an existing vault below). Notes are living documents: each is deposited MUTABLE and identified by its path, so the next extract retires what an edit removed, and a re-import that no longer finds a note records it as no longer found, which retires its claims; the first deletion under a folder and a mass deletion stop for --confirm-absent (see § Re-importing a vault). With a remote engine configured (engine.base_url), the tree-walk routes each file to the engine via deposit_file: no new endpoint, unchanged files skipped, continue-on-per-file-error, so a thin client can seed the canonical store in one command.
import project <dir> Walk a software-project tree and deposit every source file (.py by default; import_project.extensions) as PYTHON_SOURCE, one corpus entry per file. Skips dot-prefixed components and the configured build/cache dirs (import_project.ignore_dirs) but keeps underscore module files (__init__.py / _shared.py). --ext .py,.pyi overrides the glob per run; --tags, --deposited-by, --verbose mirror import vault. Re-running snapshots only the files that changed; the rest are reported unchanged and queue no extraction. With a remote engine configured, routes each file to the engine via deposit_file, like import vault. Feeds the symbol-aware docstring extractor; see § Onboarding a source tree below.
import web-clipper <dir> Walk an Obsidian Web Clipper captures folder and deposit each .md capture as a WEB_PAGE entry with the provenance its frontmatter carries restored: source/url → uri_r (fragment-stripped, not fetched), published → content_published_at (below --date), frontmatter tags ∪ --tags → entry tags; the frontmatter-stripped body is the deposited content. A header-less / malformed capture falls back to a plain LOCAL_MARKDOWN body deposit. Re-running is idempotent (body-hash dedup). One-shot scan (the watch daemon is deferred); see § Onboarding a Web Clipper captures folder below.
import mcp-memory <path> Deposit an existing @modelcontextprotocol/server-memory memory.jsonl for migration: entities become Subjects, observations become single-subject particles, relations become two-subject particles, the same encoding particles memory serve reads, so a migrated graph is visible through the façade immediately. The export is deposited verbatim as MCP_MEMORY_EXPORT (STABLE/NEVER) and every particle cites it by line number; nothing is attributed to the source store. Migrated beliefs carry calibration_source = IMPORTED at a low import floor; see § Migrating from another memory store below.
inbox process Deposit URLs queued from an iOS Share Sheet via iCloud Drive; see User Guide → Depositing URLs from your phone for the iPhone Shortcut setup Refused in remote mode (engine.base_url set).
inbox watch Continuously poll the inbox file and deposit pending URLs as they arrive Refused in remote mode (engine.base_url set).
inbox status Show pending / processed counts in the inbox file (reads the inbox file only, so it also runs in remote mode)
mcp serve Run the read-only MCP server over stdio for an AI client (Claude Code, etc.); see § MCP server
mcp tools Print the registered MCP tool surface as JSON (debugging aid; no client needed)
mcp resources Print the registered MCP resource surface: the particles://digest/<store> session-start memory digest
engine serve <host:port> Run the FastAPI engine other machines' thin clients talk to. Derives api.bind_host from the bind and enforces the fail-closed gate before the socket opens, so engine serve 0.0.0.0:8000 without a real PARTICLES_API_KEY is refused up front (localhost:8000 is loopback-OK). The client side is config, not a command: set engine.base_url (or PARTICLES_ENGINE_BASE_URL) and the daily verbs target that engine. --daemon adds resident mode: the process also runs its own consolidation tick (--if-due semantics, so over-ticking is harmless) and the intake watchers in the FastAPI lifespan, so a container needs no launchd/cron beside it. Off by default, and GET /health discloses each background task's state. Configure the rest under daemon in config.yaml. See Operator Guide → Remote engine.
engine keys create \| list \| revoke Per-client engine keys. create --role reader\|agent\|operator\|codex-capture --principal ID [--project KEY] [--label TEXT] [--reserved-principal] [--memory-root DIR] [--archive-root DIR] [--host-id ID] [--rule-root DIR] [--global-rule-root DIR] writes a key once to a new mode-0600 file (--output PATH, by default <key id>.key beside api.keys_file), or prints it with --print-token; the engine keeps only its digest in api.keys_file. Use --role codex-capture --principal codex-hook --reserved-principal for a key restricted to Codex conversation capture. A harvester key (claude-code-hook, audit) records the client directories its memory and archive files must lie under, by default the minting host's own, and the client host id every file:// entry it deposits records; without --host-id it names no memory or archive file, and the engine host's own id is refused. --rule-root names one project's root on the client, under which the hooks may push that project's rule files (a directory holding several projects is refused), and --global-rule-root the client's ~/.claude, whose two rule files directly in it are pushed as global rules. list shows id, role, principal, project, label and state, never a digest. revoke ID takes effect on the next request. Run on the engine's host; refused with engine.base_url set, and no HTTP route manages keys. See Operator Guide → Remote engine.

See Command Reference for the full auto-generated option listing.

Typical workflow

# 1. Deposit sources (no API calls, instant)
uv run particles deposit paper.pdf
uv run particles deposit https://en.wikipedia.org/wiki/East_Germany
uv run particles deposit --journal 2025-08-05.txt   # personal-journal genre
uv run particles deposit --date 2012-01-02 concept-doc.md  # stamp an old doc's authorship date
uv run particles deposit --journal --split-by-date 2026.md  # one multi-entry journal → N dated entries

# 2. Extract particles from each entry
uv run particles extract ENTRY_ID_1
uv run particles extract ENTRY_ID_2

# 3. Query
uv run particles query "when was East Germany founded?"

# 4. Maintain
uv run particles lint              # check for staleness
uv run particles review            # resolve any conflicts
uv run particles reindex           # retry any failed extractions
uv run particles reindex --dry-run # print the work plan only: no LLM calls, no writes
uv run particles reindex --estimate --extractor-version 0.15.0  # measure a bump on a sample first
uv run particles reindex --verbose # print scope size and per-entry progress
# undo a provider trial: re-extract everything one model produced
uv run particles reindex --provider-model openai:gpt-5.6-luna
# scopes AND together: just this entry, and only if that model produced it
uv run particles reindex --entry-ids 1a2b3c4d --provider-model openai:gpt-5.6-luna

Behavioural change: lint is read-only by default (0.45.0)

As of 0.45.0, particles lint no longer applies status transitions by default. It reports what it finds and leaves the store untouched. To apply the auto-fixable structural transitions (STALENESS, RETRACTION_CASCADE, CORPUS_LINK_INTEGRITY), pass --fix:

uv run particles lint          # read-only: reports findings, mutates nothing
uv run particles lint --fix    # apply structural status transitions

Scripts or cron jobs that relied on the old implicit --fix must add --fix explicitly to retain the prior behaviour. The same flip applies to POST /lint (fix defaults to false).

Onboarding an existing vault

The import vault verb honors the whitepaper §4.2 / spec §9.4 promise that particles lint runs day-one against an existing Markdown knowledge base without rebuilding it. One command points at an Obsidian vault (or any directory of Markdown notes); afterwards the standard extract + lint loop is meaningful against the contents.

# Onboard a hand-written or LLM-prose vault. Nothing is read by a model yet.
uv run particles import vault ~/Documents/MyVault

# Read the most recently edited notes first, for at most three dollars.
uv run particles extract --all-pending --budget-usd 3

# Now lint reports findings about the vault's claims.
uv run particles lint

A first pass costs what you choose. Importing is free: it deposits the notes and prints what reading them would cost, for example "about US$125–209 and 35 h at claude-sonnet-5-5" for a vault of 3,875 notes. --budget-usd 3 reads about 70 typical notes on that model, newest edited first, and stops; the rest stays pending, out of query answers until it is read, and the next extract --all-pending continues with it. A scheduled particles memory consolidate also reads pending notes, a few each night.

Two ways to start smaller or cheaper:

  • Start from one folder. import vault ~/Documents/MyVault/Projects deposits only that folder (and never treats the rest of the vault as deleted). Import the whole vault later.
  • Use the cheaper model for the first pass. The estimate also prices extraction.alternative_model, claude-haiku-5-5 by default, which met the same extraction and subject-resolution bars as claude-sonnet-5-5 on 2026-10-22 at about 0.3 cents a note against 4 (about US$12 for 3,875 notes). extract --all-pending --extraction-model anthropic:claude-haiku-5-5 uses it for that run. It splits notes into more, smaller claims, and leaves a larger share of them without a resolved subject. A note edited later is read again by the configured model.

When most notes carry the same modification time (a copy or a sync rewrote them), the import says so, and the newest-first order falls back to path order.

To try the workflow without a vault of your own, the repo bundles a small sample vault at tests/fixtures/llm_wiki_vault/: eleven numismatics notes with three planted contradictions and one stale claim, documented in the vault's _GROUND_TRUTH.md manifest so a run against it is a measurement against known ground truth. Note the manifest's caveat: the planted cross-note conflicts are not yet detected by any surface in the core loop; the fixture doubles as the acceptance test for that capability.

What the importer does:

  • Recursive .md / .markdown walk. Files under any path component starting with . or _ are skipped (so Obsidian's .obsidian/ settings, .trash/, _attachments/ scaffolds, and similar metadata-only paths do not pollute the corpus).
  • Stamps SOURCE_TYPE = LOCAL_MARKDOWN on each entry. The GeneralExtractor routes that source type through a frontmatter stripper before sending the body to the LLM, so YAML metadata (tags:, aliases:, created:, …) at the top of notes does not surface as particle content.
  • Each note is a living document. Notes are deposited MUTABLE and identified by their path, so two notes with identical bytes (two copies of one template) are two sources. --mutability STABLE deposits one run's notes as an archive that will not change.
  • Skips the store's own export. A folder holding .particles-export.json (written by every particles export run) is not walked, so exporting into the vault and importing it again does not read the store's rendering of itself back as your notes.
  • --verbose emits [i/N] depositing path/to/file.md progress lines so large vaults don't sit silent during onboarding.

Re-importing a vault

Run the same command again whenever the vault changes. Only what changed costs anything:

Since the last import The import writes The next extract --all-pending
a note is unchanged nothing reads nothing
a note was edited one new snapshot reads that note once, then retires the claims it no longer states
a note was deleted one "no longer found" record retires the note's claims, with no model call
a note was renamed a new entry, and a "no longer found" record for the old path reads the note under its new name; claims it still states are kept

The closing line counts each kind and says the change takes effect at the next extraction, for example Deposited 2 note(s) from ~/Documents/MyVault: 1 new or changed, 1 unchanged, 1 no longer found; changes take effect at the next extract. Until that extraction runs, query still answers from what the notes said before.

A deletion is not an erasure. A deleted note's text stays in the corpus and its claims stay in the store, retired and dated, so query --as-of <date before the deletion> still shows what the note said. To remove a note's text and claims for good, run particles corpus delete <entry>.

Deletions are confirmed before anything is retired. The first time a walk of a folder finds a note missing, it records nothing, lists the note, and exits 1; run it again with --confirm-absent to record it. After that, a walk that would record more than a quarter of the folder's notes as gone (and at least five) stops the same way, because an unmounted volume, a sync client that has not finished, or a folder typed one level too deep looks exactly like deleting everything. --keep-missing records no deletion for one run. The guards are import_vault.confirm_absent (first or always) and import_vault.max_absent_fraction in config.yaml. Importing a subfolder never marks a note outside it as gone, and a note iCloud has evicted (replaced by a .<name>.icloud placeholder) is not treated as deleted.

Run the import after your sync client reports it is idle. In a small vault the mass-deletion guard never fires: in a vault of three notes, one note still syncing reads as one deletion. Its claims retire, and when the file arrives the next import reads it again as new claims.

A vault imported by an earlier version was deposited STABLE. The first re-import reclassifies those notes MUTABLE and retires nothing. When some of them were edited between earlier imports, the line names the count of claims their older versions still hold and the command that retires them, particles corpus refresh --backfill-cascade, which previews before it asks for --yes.

Known limitations (all out of scope, flagged as follow-up):

  • Wikilinks ([[Other Note]]) are not resolved to subject IDs. They pass through the LLM as plain text. A follow-up ADR is required before wiring this in to avoid drift.
  • Frontmatter is dropped, not promoted. A note with subject: France in its frontmatter does NOT seed a canonical-name Subject row. Same follow-up.
  • Particles-exported callouts round-trip is not implemented. The importer assumes vaults are hand-written or LLM-prose, not the output of particles export obsidian, and skips any folder an export wrote (it holds .particles-export.json). An export written before that ledger existed is not recognised; the import says how many export folders it skipped, so a missed one is visible.
  • Against a remote engine the notes are uploaded one file at a time, so they are deposited STABLE and a deleted note is not recorded.

Onboarding a source tree

import project is the source-code analog of import vault: it walks a software-project tree and deposits one PYTHON_SOURCE corpus entry per source file, so the deterministic docstring extractor can turn documented symbols into queryable, cross-checkable particles.

# Deposit a project's source tree (one entry per .py file).
uv run particles import project ~/src/myproject

# Extract docstring particles from everything just deposited.
uv run particles extract --all-pending

# Lint surfaces code/design drift: a docstring that contradicts a decided
# ADR/spec particle in the same store (no new lint code).
uv run particles lint

What the importer does:

  • Recursive source-glob walk (.py by default; set import_project.extensions). The ignore policy differs from the vault walker by design: dot-prefixed components (.git, .venv, .mypy_cache) and the configured build/cache directories (import_project.ignore_dirs: __pycache__, node_modules, build, dist, …) are pruned, but underscore-prefixed module files are kept. __init__.py, _shared.py, _logging.py carry real docstrings, so the vault walker's blanket _-component skip would silently lose them.
  • Stamps SOURCE_TYPE = PYTHON_SOURCE on each entry, routing it to the symbol-aware docstring extractor. A lone .py deposited directly (particles deposit foo.py) routes the same way.
  • --ext .py,.pyi overrides the glob for one run (which files to deposit is a per-invocation choice); --tags, --deposited-by, and --verbose mirror import vault.
  • Idempotent. Existing content_hash deduplication applies; editing one file and re-running appends a snapshot only to that file's entry.

Out of scope for now (§ Deferred): depositing a whole remote GitHub repo as a tree (the GitHub importer is single-file), non-Python language source trees, .gitignore-aware walking, and non-source project files (READMEs are covered by import vault).

Onboarding a Web Clipper captures folder

import web-clipper is a general frontmatter-Markdown intake with the Obsidian Web Clipper as its first configured profile. The Clipper saves each web page to a vault as a Markdown file with a YAML frontmatter header (source:, published:, tags:, …). Running that folder through import vault would throw away the structured provenance the Clipper already captured: the entry's uri_r becomes the local file:// path, the publication date is lost, and the per-file tags are dropped. import web-clipper reads the header and restores all of it.

# Onboard a folder of Web Clipper captures.
uv run particles import web-clipper ~/Obsidian/Clippings

# Extract over everything just deposited.
uv run particles extract --all-pending

# Lint now reasons over the clippings as the web pages they are.
uv run particles lint

What the importer does (per the web_clipper config profile):

  • Recursive .md / .markdown walk with the vault ignore policy (skips _ / . components; a Clipper folder is an Obsidian vault folder).
  • Maps the frontmatter onto deposit fields. source (fallback url) becomes the entry's uri_r, fragment-stripped and not fetched (the archived clip is the record of what was seen; mutability=STABLE, fetch_policy=NEVER), which means corpus-link-gap lint, mention reconciliation, and refetch identity all see the real web page, not a local file. published becomes content_published_at, below an explicit --date. The frontmatter tags merge with any run-wide --tags (per-file ∪ run-wide).
  • Stamps SOURCE_TYPE = WEB_PAGE, so the entry is now trustable, decayable (content-age decay), and queryable as the web page it clipped.
  • Deposits the frontmatter-stripped body as the entry's bytes, so the extractor sees the article, not the YAML header.
  • Idempotent (body-hash dedup). Re-clips that differ only in clip-time metadata collapse to one entry; a page clipped twice (same source:) collapses to one entry with two snapshots, not two file://-keyed entries.
  • Graceful degradation. A capture whose header is absent or malformed falls back to a plain LOCAL_MARKDOWN body deposit rather than aborting the scan.
  • A capture never shares an entry with another depositor. A capture whose source: names a URL another depositor's entry already holds is deposited as a plain local file. When a capture holds a URL first and another depositor later deposits it (particles deposit <url>, the HTTP route, the inbox), that deposit gets an entry of its own under the URL, and the capture's entry keeps its snapshots and tags with no URI-R.

The profile is config (web_clipper.url_keys / date_keys / tag_keys / source_type), so a second frontmatter producer is an operator edit, not a code change. Out of scope for now (§ Deferred): a watching daemon (import web-clipper watch), first-class title / author capture, and a second profile + verb generalisation.

Migrating from another memory store

import mcp-memory brings an existing agent-memory graph across. It is the third clause of the adoption story: swap in one edit (particles memory serve), onboard in one command, bring your history with you.

# First, rehearse: print what the import would produce, and what it would
# drop, without depositing or writing anything (no store is opened).
uv run particles import mcp-memory ~/.mcp/memory.jsonl --dry-run

# Bring an existing reference-server graph across.
uv run particles import mcp-memory ~/.mcp/memory.jsonl

# Turn the export into particles (no LLM call, no network: the mapping is
# structural, because the records are already claim-granular).
uv run particles extract --all-pending

# Lint now reasons over beliefs your previous store could not lint at all.
uv run particles lint

Rehearsing an import: --dry-run

An import runs on a user's real graph, and a wrong mapping is otherwise found only after particles are written (recoverable by reindex, since the export is in the corpus, but a poor first impression). --dry-run parses the export, runs the same mapping function the extractor runs, and reports:

  • record counts in the export's own vocabulary (entities, observations, relations), then the Subjects and particles they map to;
  • entities with no observations, split into those that would not survive at all and those that survive as a relation endpoint (with their entity type);
  • everything dropped from the particles and preserved in the blob: skipped lines, non-text observations, and fields the reference format does not define;
  • a sample of mapped records, spread across the export (--sample N).

It opens no session and deposits nothing, so it needs no db init, is safe on a populated store, and (unlike the import itself) runs in remote mode. The counts are what the export contributes: the dry run does not consult the store, so Subject re-attachment and duplicate-claim dedup can only make the real import smaller. --json emits the same report as JSON; the exit code is 1 when nothing in the export would become a particle.

The second-hand attribution rule

Every migrated record is attributed to the import event and the export artifact, never to a source the store never held. Concretely:

  • The corpus entry is the export file, stamped MCP_MEMORY_EXPORT, with mutability=STABLE / fetch_policy=NEVER: a dump is a record of what was seen, not a live handle, and the incumbent store may be gone by the time anyone asks.
  • Provenance points at that snapshot, with the record's line number as location: "this claim appears at this position in this file, whose bytes hash to this", which is exactly true and independently checkable. A ProvenanceRef into the source store's own ids is never synthesised: the SDK never fetched it and cannot re-verify it.
  • The importing operator is recorded as a ContributorRef with the importer role, so who brought a belief in is part of its record.
  • Anything the mapping cannot honestly place is left in the blob, never guessed at. Malformed lines are skipped and reported, not silently dropped.

Why your migrated beliefs look less confident

They are second-hand, and the SDK says so rather than flattering them:

  • Every migrated particle carries calibration_source = IMPORTED and a single flat migration.import_confidence (default 0.35). One number, one meaning: this was believed by a system we cannot interrogate.
  • The source store's own scores (where its format has them) are preserved as tags and never become confidence.value. That field is immutable at creation and multiplies into effective_confidence, so importing another system's unexplained scalar would silently colour every downstream ranking.
  • IMPORTED is a distinct calibration source precisely so you can still tell what you brought with you from what your agent has learned since, and so an operator can cap the two populations separately.

The lever for trusting a migrated store is particles trust set, against the export's source type: revisable, auditable, and demotion-only. Raising migration.import_confidence is not that lever: it is frozen into each particle at creation and cannot be revised afterwards.

Re-running an import

Importing the same export twice produces zero new particles. The export dedups to one corpus entry by content hash, entities re-attach to their existing Subjects through their mcp-memory external ref, and identical claims are caught by the exact-duplicate rung before reconciliation. A changed export (you kept using the old store and exported again) adds a new snapshot and brings only what is new.

Known limits

  • An entity with no observations and no relations is not migrated. The reference server keeps an entity that has never been observed; a particle store has no belief to hang it on, so nothing is created. This is accepted permanently rather than worked around: a bare Subject minted by the importer is a PHANTOM_SUBJECT finding on the next particles lint. The verb names the affected entities as it runs, and the count is repeated as an extraction quality note. An observation-less entity that is a relation endpoint does migrate, with its entityType. To keep an isolated one, recreate it through the façade's create_entities after the swap.
  • One format ships today. Mem0 / Zep / SuperMemory mappers are not speculative work: a format is added when a real migrating user brings that export, because undocumented, unversioned schemas written against a guess rot silently.

Cross-exporter quality threshold

particles export <format> accepts --min-particle-confidence for every shipped exporter (wiki, obsidian, anki, logseq, jsonl, notion). Particles whose effective_confidence (trust-weighted) falls below the threshold are dropped before any per-exporter downstream step: prompt input, cache hash, count-based min_particles check, rendered output, references. Default 0.0 is a no-op; operators opt in.

uv run particles export wiki ./out --min-particle-confidence 0.5
uv run particles export obsidian ./vault --min-particle-confidence 0.5
uv run particles export anki ./deck.txt --min-particle-confidence 0.5
uv run particles export logseq ./graph --min-particle-confidence 0.5
uv run particles export notion --dry-run --min-particle-confidence 0.5

The per-invocation flag overrides config.exporter_common.min_particle_confidence. See the Migration section for the cross-exporter rationale.

Upgrading across an SDK schema bump

Particles uses a separate SCHEMA_VERSION (the on-disk particle shape) distinct from the SDK package version. Within the v1.x line, schema bumps are additive-compat per strict SemVer, so your existing store keeps working. Across a major schema bump (the only one to date is v0.3.x → v1.0.0 at the freeze), the SDK refuses to operate on a store with mismatched-schema particles and surfaces this error:

Particle store contains N ACTIVE particles whose schema_version does not
match the current SDK (SDK is at v1.0.0; store has N at v0.3.0).
the v0.3.x → v1.0.0 upgrade path is scrap-and-re-extract.
Run:
  particles db init --force    # confirms before dropping
  particles extract --all-pending
The corpus is preserved; only the particle store is rebuilt.

The corpus (CorpusEntry rows + the content-addressed blob store) is preserved across the rebuild. Only the particle store is dropped and re-extracted from the existing corpus content. Re-extraction cost is local LLM time; no re-fetch from the internet.

# 1. Snapshot the existing store metadata in case you want to diff later.
cp particles.db particles.db.0.3.x-backup

# 2. Re-initialise the store fresh (confirms before dropping).
uv run particles db init --force

# 3. Re-extract from every corpus entry already deposited.
uv run particles extract --all-pending

lint is the one operation that does NOT refuse: it reports mismatched particles as SCHEMA_VERSION_MISMATCH findings so the operator can diagnose first. query / extract / review / reindex all refuse.

MCP server

particles mcp serve runs a read-only Model Context Protocol server over stdio, so AI clients (Claude Code, Claude Desktop, other MCP-aware tools) can consult the particle store with typed JSON tool calls rather than parsing CLI prose.

Install

claude mcp add particles -- uv run --project /path/to/particles-engine-py particles mcp serve

The client spawns the server as a child process the first time it needs one of the registered tools.

Tool surface

Read-only in v1. Every tool delegates to an existing operation:

Tool What it returns
query Tag/subject-aware semantic query: NL answer + ranked particles + coverage gaps
particle_show One particle with provenance URLs, source types, and linked subjects
particle_search All particles sharing a context fingerprint
particles_list Particles filtered by status and/or subject (paginated, no embeddings)
subjects_list Every subject in the knowledge graph
subjects_search Substring search over subject canonical names
subjects_show One subject plus the particle IDs that mention it
list_taxonomies Every taxonomy + its full tag tree
list_corpus_entries Recent corpus entries (paginated, source-type-filterable)
lint Structural lint findings (no --fix, no LLM semantic checks)
quality_report Extraction-quality dashboard snapshot
links_suggest Co-evidential candidate pairs within a Subject (report mode only; --apply is CLI/HTTP-only)
events_list Operator event log, newest first
event_show One operator event in full: header, refs, payload

Mutating tools (deposit, extract, tag/untag, status transitions) are not shipped; a read-write MCP surface is designed (proposed, not yet implemented); until it lands the MCP surface cannot change the store.

Debugging without a client

uv run particles mcp tools                    # JSON dump of the registered surface
uv run particles mcp tools --format text      # one-line-per-tool summary

The JSON output is what tests/mcp/tool-schema.json should match; if those drift apart, the unit test TestToolSchemaGolden fails in PR review.

Prefix

All commands must be prefixed with uv run unless you activate the virtualenv first:

# With uv run prefix (recommended)
uv run particles query "..."

# Or activate once per session
source .venv/bin/activate
particles query "..."