CLI
Every subcommand prints one JSON envelope on stdout unless --text asks for readable lines (DESIGN §2):
| Outcome | stdout | Exit |
|---|---|---|
| success | {"ok":true,"operation":…,"data":…} |
0 |
| failure | {"ok":false,…,"error":…} |
1 |
| usage error | — | 2 |
| cancelled | — | 130 |
In omp, most /rematch <command> invocations run the same command; the exceptions are listed in day to day.
Commands
Section titled “Commands”| Command | What it does |
|---|---|
doctor |
omp binary + version, roles, extension link, ledger schema, roots, off state |
import |
Import session history (omp, Claude Code, Codex, Pi, OpenCode) and/or a compound-forge checkout |
reflect |
Count finished traces, then reflect on pending sessions (idempotent) |
match |
Staging dirs, entries and hooks that load for a directory |
skills |
The shared skill directory every harness loads (REMATCH_ROOT/skills): sync |
retrieve |
Units of the loaded skill packages that match a query (the retrieve context hook) |
digest |
Session-start digest: new statuses, approvals, review list, transfers |
record |
Append an event for a session (marks); the trace file stays the primary input |
trace-event |
Harness hook payload on stdin → DESIGN §3 trace records (Claude Code, OpenCode adapters) |
hook-check |
Harness pre-tool payload on stdin → approved block/stuck hooks verdict (Claude Code, OpenCode adapters) |
create |
Greenfield: create an entry from sessions, a task, or a description (draft) |
improve |
Brownfield: register, audit, split or propose a sibling for an existing skill |
activate |
Draft → provisional |
run |
Batch run with a verifier (detached; returns a job id) |
status |
Job status (or all jobs + entry counts) |
library |
Library: ls, why, disable, rollback, pin, unpin, approve, decline, set-fork-path, export, import-export |
task |
Batch task definitions |
transfer |
Cross-branch transfer of kept invariant lessons |
ship |
Open a team/fork PR for entries |
stale |
Evidence drift: mark entries stale (or re-canary one) |
split |
Per-family split of entries whose counters diverge |
anchor |
Anchor replay of a kept entry’s originating task with its sibling in place (manual: reports, stages nothing) |
builtins |
Built-in entries (context unit retrieval, tool-output truncation, stuck detection) |
count |
Fold finished traces into counters and decide |
mark |
Override the redirect class of a session’s last turn |
off |
Kill switch on (writes the off marker) |
on |
Kill switch off (removes the off marker) |
uninstall |
Remove every file rematch wrote (plan only without --yes) |
lake |
The lake (ADR 001): export, import, rebuild, doctor, migrate |
report |
The kill criterion (ADR 001 L4): kept entries over ≥ 4 matched sessions and recurrence per trigger, with-entry vs before-arm |
policy |
REMATCH_ROOT/policy.json: show, declare a repo’s domain (domain set|unset), caps (kept_per_domain) |
tune |
Predicate tuning: read-but-missed sessions widen a skill’s stems, matched-but-unread narrow them; staged as a provisional sibling |
profile |
The profile (REMATCH_ROOT/profile, a git repo synced across machines): init, adopt, sync, status, install-launchd |
rematch
Section titled “rematch”rematch: trace-grounded harness evolution for omp, Claude Code, Codex, Pi and OpenCode
Usage: rematch [OPTIONS] <COMMAND>
Commands: doctor omp binary + version, roles, extension link, ledger schema, roots, off state import Import session history (omp, Claude Code, Codex, Pi, OpenCode) and/or a compound-forge checkout reflect Count finished traces, then reflect on pending sessions (idempotent) match Staging dirs, entries and hooks that load for a directory skills The shared skill directory every harness loads (REMATCH_ROOT/skills): sync retrieve Units of the loaded skill packages that match a query (the `retrieve` context hook) digest Session-start digest: new statuses, approvals, review list, transfers record Append an event for a session (marks); the trace file stays the primary input trace-event Harness hook payload on stdin → DESIGN §3 trace records (Claude Code, OpenCode adapters) hook-check Harness pre-tool payload on stdin → approved block/stuck hooks verdict (Claude Code, OpenCode adapters) create Greenfield: create an entry from sessions, a task, or a description (draft) improve Brownfield: register, audit, split or propose a sibling for an existing skill activate Draft → provisional run Batch run with a verifier (detached; returns a job id) status Job status (or all jobs + entry counts) library Library: ls, why, disable, rollback, pin, unpin, approve, decline, set-fork-path, export, import-export task Batch task definitions transfer Cross-branch transfer of kept invariant lessons ship Open a team/fork PR for entries stale Evidence drift: mark entries stale (or re-canary one) split Per-family split of entries whose counters diverge anchor Anchor replay of a kept entry's originating task with its sibling in place (manual: reports, stages nothing) builtins Built-in entries (context unit retrieval, tool-output truncation, stuck detection) count Fold finished traces into counters and decide mark Override the redirect class of a session's last turn off Kill switch on (writes the `off` marker) on Kill switch off (removes the `off` marker) uninstall Remove every file rematch wrote (plan only without --yes) lake The lake (ADR 001): export, import, rebuild, doctor, migrate report The kill criterion (ADR 001 L4): kept entries over ≥ 4 matched sessions and recurrence per trigger, with-entry vs before-arm policy REMATCH_ROOT/policy.json: show, declare a repo's domain (domain set|unset), caps (kept_per_domain) tune Predicate tuning: read-but-missed sessions widen a skill's stems, matched-but-unread narrow them; staged as a provisional sibling profile The profile (REMATCH_ROOT/profile, a git repo synced across machines): init, adopt, sync, status, install-launchd help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print help -V, --version Print versionrematch doctor
Section titled “rematch doctor”omp binary + version, roles, extension link, ledger schema, roots, off state
Usage: rematch doctor [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch import
Section titled “rematch import”Import session history (omp, Claude Code, Codex, Pi, OpenCode) and/or a compound-forge checkout
Usage: rematch import [OPTIONS]
Options: --history Import session history into the ledger
--text Human-readable output instead of the JSON envelope
--cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …)
--harness <HARNESS> Which harness's history: omp, claude-code, codex, pi, opencode, or all (default: each harness's default dir that exists)
Possible values: - omp: omp: `<agent dir>/sessions` plus every profile's sessions dir - claude-code: Claude Code: `~/.claude/projects` (`$CLAUDE_CONFIG_DIR/projects`) - codex: Codex: `~/.codex/sessions` (`$CODEX_HOME/sessions`) - pi: Pi: `~/.pi/agent/sessions` (`$PI_CODING_AGENT_SESSION_DIR`, `$PI_CODING_AGENT_DIR/sessions`) - opencode: OpenCode: its session store `opencode.db` (`$OPENCODE_DB`, `$XDG_DATA_HOME/opencode`) - all: Every harness whose default history dir exists
[default: all]
--sessions <DIR> Sessions directory of the selected harness (OpenCode: its `opencode.db` or the dir holding it; with `--harness all`: an omp sessions dir)
--skip-profile <NAME> Skip a named profile during `--history` import (repeatable; merged with `policy.json` `skip_profiles`)
--forge <PATH> compound-forge checkout: skills/* → provisional brownfield entries, learnings/*.md → lessons
--migrate With --forge: copy each skill into rematch's own staging instead of registering it in place, so the forge checkout and plugin can be removed afterwards. Scripts are staged non-executable
-h, --help Print help (see a summary with '-h')rematch reflect
Section titled “rematch reflect”Count finished traces, then reflect on pending sessions (idempotent)
Usage: rematch reflect [OPTIONS]
Options: --pending Process every pending reflection (the only mode; kept for the documented argv) --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --session <SESSION> Only this session (count + reflect) --editor <EDITOR> Scripted editor command replacing omp for every model call (tests) --detach Run detached and return a job id --history First hand flagged imported sessions (`import --history`) without a trace to reflection --since <YYYY-MM-DD> With --history: only sessions started on or after this UTC date --limit <N> With --history: at most this many sessions handed to reflection per run (default 10) -h, --help Print helprematch match
Section titled “rematch match”Staging dirs, entries and hooks that load for a directory
Usage: rematch match [OPTIONS]
Options: --inputs <INPUTS> First inputs/paths of the session: a JSON array of texts, or `{"texts":[…],"paths":[…]}`. Refines `predicate_hit` with the count-time content rule --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch skills
Section titled “rematch skills”The shared skill directory every harness loads (REMATCH_ROOT/skills): sync
Usage: rematch skills [OPTIONS] <COMMAND>
Commands: sync Link the skills that load for --cwd into REMATCH_ROOT/skills (adds matching provisional entries, keeps every kept/pinned one, prunes links of entries no longer loadable) help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch skills sync
Section titled “rematch skills sync”Link the skills that load for --cwd into REMATCH_ROOT/skills (adds matching provisional entries, keeps every kept/pinned one, prunes links of entries no longer loadable)
Usage: rematch skills sync [OPTIONS]
Options: --harness <HARNESS> The harness asking. `claude-code` also links the plugin's `skills/` and copies the agent entries into its `agents/` (plugin: $CLAUDE_PLUGIN_ROOT, else the `~/.claude/skills/rematch` install); `codex` reports whether Codex reaches the shared dir
Possible values: - omp - claude-code - codex - pi: Pi: the rematch Pi package returns the shared dir from `resources_discover` - opencode: OpenCode: the shared sync only; the rematch OpenCode plugin delivers the dir
--text Human-readable output instead of the JSON envelope
--cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …)
-h, --help Print help (see a summary with '-h')rematch retrieve
Section titled “rematch retrieve”Units of the loaded skill packages that match a query (the `retrieve` context hook)
Usage: rematch retrieve [OPTIONS] --query <QUERY>
Options: --query <QUERY> Request text: the last user message and recent tool-result paths --text Human-readable output instead of the JSON envelope --budget <BUDGET> Byte budget for the returned unit texts [default: 6000] --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --min-overlap <MIN_OVERLAP> Distinct query stems a unit must share to be returned [default: 2] --entries <ENTRIES> Comma-separated entry ids the caller loaded; units of other entries are never returned -h, --help Print helprematch digest
Section titled “rematch digest”Session-start digest: new statuses, approvals, review list, transfers
Usage: rematch digest [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch record
Section titled “rematch record”Append an event for a session (marks); the trace file stays the primary input
Usage: rematch record [OPTIONS] --session <SESSION> --event <EVENT>
Options: --session <SESSION> --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --event <EVENT> Event JSON (`{"ev":"mark","class":"correction"}`) -h, --help Print helprematch trace-event
Section titled “rematch trace-event”Harness hook payload on stdin → DESIGN §3 trace records (Claude Code, OpenCode adapters)
Usage: rematch trace-event [OPTIONS] --harness <HARNESS>
Options: --harness <HARNESS> Harness whose hook payload arrives on stdin
Possible values: - claude-code - opencode: The OpenCode plugin (`adapters/opencode`, `crate::opencode_event`)
--text Human-readable output instead of the JSON envelope
--cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …)
--session <SESSION> Session id (default: `cc:<payload session_id>`)
--hook-output Speak the harness hook protocol: hook JSON on stdout, a block reason on stderr with exit 2; any error exits 0. Without it the result is the usual envelope
-h, --help Print help (see a summary with '-h')rematch hook-check
Section titled “rematch hook-check”Harness pre-tool payload on stdin → approved block/stuck hooks verdict (Claude Code, OpenCode adapters)
Usage: rematch hook-check [OPTIONS] --harness <HARNESS>
Options: --harness <HARNESS> Harness whose hook payload arrives on stdin
Possible values: - claude-code - opencode: The OpenCode plugin (`adapters/opencode`, `crate::opencode_event`)
--text Human-readable output instead of the JSON envelope
--cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …)
--session <SESSION> Session id (default: `cc:<payload session_id>`)
--hook-output Speak the harness hook protocol: hook JSON on stdout, a block reason on stderr with exit 2; any error exits 0. Without it the result is the usual envelope
-h, --help Print help (see a summary with '-h')rematch create
Section titled “rematch create”Greenfield: create an entry from sessions, a task, or a description (draft)
Usage: rematch create [OPTIONS] --from <FROM> <NAME>
Arguments: <NAME>
Options: --from <FROM> [possible values: sessions, task, description] --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --task <TASK> --branch <BRANCH> --description <DESCRIPTION> --files <FILES>... --ran <RAN> `--from sessions`: the references are sessions whose bash commands have every one of these words (comma-separated, case-folded; `--ran cargo,test` finds `cd x && cargo test --workspace`), ranked by their overlap with the request --editor <EDITOR> Scripted editor command (tests) -h, --help Print helprematch improve
Section titled “rematch improve”Brownfield: register, audit, split or propose a sibling for an existing skill
Usage: rematch improve [OPTIONS] <SKILL>
Arguments: <SKILL>
Options: --split-only Only the mechanical split (no model, no session minimum) --text Human-readable output instead of the JSON envelope --branch <BRANCH> --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --editor <EDITOR> Scripted editor command (tests) -h, --help Print helprematch activate
Section titled “rematch activate”Draft → provisional
Usage: rematch activate [OPTIONS] <NAME>
Arguments: <NAME>
Options: --task <TASK> Run the task once (reference rollout) and attach its trace as evidence --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --unverified Accept the risk: activate without a trace -h, --help Print helprematch run
Section titled “rematch run”Batch run with a verifier (detached; returns a job id)
Usage: rematch run [OPTIONS] --task <TASK>
Options: --task <TASK> --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --verifier <VERIFIER> Verifier spec (tests | parity:<produced>=<expected> | receipt:<path> | [script:]<cmd>); defaults to the task's verifier --width <WIDTH> Candidates per editor scope (rollouts: (k+1)² + [k>1]) [default: 1] --seed <SEED> Rollout seed (default: the task's first seed) -h, --help Print helprematch status
Section titled “rematch status”Job status (or all jobs + entry counts)
Usage: rematch status [OPTIONS] [JOB]
Arguments: [JOB]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library
Section titled “rematch library”Library: ls, why, disable, rollback, pin, unpin, approve, decline, set-fork-path, export, import-export
Usage: rematch library [OPTIONS] <COMMAND>
Commands: ls Every entry with raw counters why Loaded entries, predicate hits, redirects and counters of a session (default: latest for --cwd) disable Retire an entry now (user disable; counts as harm for that session) rollback Restore the predecessor of a kept skill or agent; retire the current one pin unpin approve One-tap approval of everything of an entry that waits for it — scripts, hook, provisional agent, `AGENTS.fragment.md` as personal system-prompt text — or of an `export:<id>` item decline Decline an approval (retires the entry; `export:<id>` only suppresses the offer) set-fork-path Set the repo-relative file `ship --scope fork` writes for an entry (and, with --repo, the fork checkout it goes to) export Work → home export of invariant entries import-export Import an export directory help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library ls
Section titled “rematch library ls”Every entry with raw counters
Usage: rematch library ls [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library why
Section titled “rematch library why”Loaded entries, predicate hits, redirects and counters of a session (default: latest for --cwd)
Usage: rematch library why [OPTIONS] [SESSION]
Arguments: [SESSION]
Options: --asof <TS> Also the status each loaded entry and the class each redirect had at this time (ms, RFC 3339, `YYYY-MM-DDTHH:MM[:SS]` UTC, or `YYYY-MM-DD` = 00:00 UTC), from the lake's `entries`/`redirects` or this ledger's journal --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library disable
Section titled “rematch library disable”Retire an entry now (user disable; counts as harm for that session)
Usage: rematch library disable [OPTIONS] <ID>
Arguments: <ID>
Options: --reason <REASON> [default: "user request"] --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library rollback
Section titled “rematch library rollback”Restore the predecessor of a kept skill or agent; retire the current one
Usage: rematch library rollback [OPTIONS] <SKILL>
Arguments: <SKILL>
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library pin
Section titled “rematch library pin”Usage: rematch library pin [OPTIONS] <ID>
Arguments: <ID>
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library unpin
Section titled “rematch library unpin”Usage: rematch library unpin [OPTIONS] <ID>
Arguments: <ID>
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library approve
Section titled “rematch library approve”One-tap approval of everything of an entry that waits for it — scripts, hook, provisional agent, `AGENTS.fragment.md` as personal system-prompt text — or of an `export:<id>` item
Usage: rematch library approve [OPTIONS] <ID>
Arguments: <ID>
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library decline
Section titled “rematch library decline”Decline an approval (retires the entry; `export:<id>` only suppresses the offer)
Usage: rematch library decline [OPTIONS] <ID>
Arguments: <ID>
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library set-fork-path
Section titled “rematch library set-fork-path”Set the repo-relative file `ship --scope fork` writes for an entry (and, with --repo, the fork checkout it goes to)
Usage: rematch library set-fork-path [OPTIONS] <ID> <PATH>
Arguments: <ID> <PATH>
Options: --repo <REPO> --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch library export
Section titled “rematch library export”Work → home export of invariant entries
Usage: rematch library export [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --to <TO> Export dir (git-tracked; default REMATCH_ROOT/export) --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --entry <ENTRIES> Entry id or name (repeatable); default: every kept invariant entry --approve Approve the listed `--entry` exports (after seeing their diffs) --approve-all Approve every candidate without per-entry review -h, --help Print helprematch library import-export
Section titled “rematch library import-export”Import an export directory
Usage: rematch library import-export [OPTIONS]
Options: --from <FROM> Export dir to read (default REMATCH_ROOT/export) --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch task
Section titled “rematch task”Batch task definitions
Usage: rematch task [OPTIONS] <COMMAND>
Commands: add Define (or redefine) a batch task ls List task definitions help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch task add
Section titled “rematch task add”Define (or redefine) a batch task
Usage: rematch task add [OPTIONS] --repo <REPO> --prompt <PROMPT> <ID>
Arguments: <ID>
Options: --repo <REPO> --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --prompt <PROMPT> --verifier <VERIFIER> --max-time <MAX_TIME> Per-rollout time cap: `600`, `90s`, `10m`, `1h` --tools <TOOLS> omp `--tools` list for rollouts --seed <SEEDS> Rollout seed (repeatable); exported to rollouts and verifiers as `REMATCH_SEED` -h, --help Print helprematch task ls
Section titled “rematch task ls”List task definitions
Usage: rematch task ls [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch transfer
Section titled “rematch transfer”Cross-branch transfer of kept invariant lessons
Usage: rematch transfer [OPTIONS] <COMMAND>
Commands: suggest List kept invariant lessons not yet tried in a structurally overlapping branch apply Stage a provisional copy of a lesson in another branch promote Copy entries kept in two or more branches to `shared` (kept, no new canary) help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch transfer suggest
Section titled “rematch transfer suggest”List kept invariant lessons not yet tried in a structurally overlapping branch
Usage: rematch transfer suggest [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch transfer apply
Section titled “rematch transfer apply”Stage a provisional copy of a lesson in another branch
Usage: rematch transfer apply [OPTIONS] --branch <BRANCH> <LESSON_ID>
Arguments: <LESSON_ID>
Options: --branch <BRANCH> --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch transfer promote
Section titled “rematch transfer promote”Copy entries kept in two or more branches to `shared` (kept, no new canary)
Usage: rematch transfer promote [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch ship
Section titled “rematch ship”Open a team/fork PR for entries
Usage: rematch ship [OPTIONS] --scope <SCOPE>
Options: --scope <SCOPE> team (`<repo>/.omp/skills/`, `.omp/agents/`, `AGENTS.md`) or fork (`<repo>/<fork_path>`) [possible values: team, fork] --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --repo <REPO> Target repo (team: defaults to the entry's originating repo; fork: defaults to the entry's `fork_repo`) --entry <ENTRIES> Entry id or name (repeatable). Listing an entry makes it eligible for team scope --push Push the branch to `--remote` (default: no network) --pr Open a PR with `gh pr create --fill --body-file` (requires --push; never merges) --remote <REMOTE> [default: origin] -h, --help Print helprematch stale
Section titled “rematch stale”Evidence drift: mark entries stale (or re-canary one)
Usage: rematch stale [OPTIONS]
Options: --dry-run Report drift without moving entries to `stale` --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --recanary <ENTRY> Bring a stale entry back as a new provisional version (new canary) -h, --help Print helprematch split
Section titled “rematch split”Per-family split of entries whose counters diverge
Usage: rematch split [OPTIONS]
Options: --review-days <REVIEW_DAYS> Capability-floor window in days [default: 7] --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch anchor
Section titled “rematch anchor”Anchor replay of a kept entry's originating task with its sibling in place (manual: reports, stages nothing)
Usage: rematch anchor [OPTIONS] <COMMAND>
Commands: replay Replay the originating task of the kept entry <entry> would replace, with <entry> in its place; reports the verdict and changes no status help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch anchor replay
Section titled “rematch anchor replay”Replay the originating task of the kept entry <entry> would replace, with <entry> in its place; reports the verdict and changes no status
Usage: rematch anchor replay [OPTIONS] <ENTRY>
Arguments: <ENTRY>
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch builtins
Section titled “rematch builtins”Built-in entries (context unit retrieval, tool-output truncation, stuck detection)
Usage: rematch builtins [OPTIONS] <COMMAND>
Commands: ls The shipped built-in entries with their current entry, status, approval and counters reinstall Stage a fresh provisional version of built-ins that are not live (retired, dormant, stale or missing); live ones are left alone. Default: every built-in help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch builtins ls
Section titled “rematch builtins ls”The shipped built-in entries with their current entry, status, approval and counters
Usage: rematch builtins ls [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch builtins reinstall
Section titled “rematch builtins reinstall”Stage a fresh provisional version of built-ins that are not live (retired, dormant, stale or missing); live ones are left alone. Default: every built-in
Usage: rematch builtins reinstall [OPTIONS] [NAMES]...
Arguments: [NAMES]...
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch count
Section titled “rematch count”Fold finished traces into counters and decide
Usage: rematch count [OPTIONS]
Options: --session <SESSION> --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --editor <EDITOR> Scripted command for the classifier/reflector calls (tests) -h, --help Print helprematch mark
Section titled “rematch mark”Override the redirect class of a session's last turn
Usage: rematch mark [OPTIONS] --session <SESSION> --class <CLASS>
Options: --session <SESSION> --text Human-readable output instead of the JSON envelope --class <CLASS> [possible values: correction, preference, scope] --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch off
Section titled “rematch off”Kill switch on (writes the `off` marker)
Usage: rematch off [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch on
Section titled “rematch on”Kill switch off (removes the `off` marker)
Usage: rematch on [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch uninstall
Section titled “rematch uninstall”Remove every file rematch wrote (plan only without --yes)
Usage: rematch uninstall [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --yes Apply the plan (otherwise print it) --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch lake
Section titled “rematch lake”The lake (ADR 001): export, import, rebuild, doctor, migrate
Usage: rematch lake [OPTIONS] <COMMAND>
Commands: export Journal rows past this machine's watermark and closed sessions' traces → Parquet import Merge another machine's lake (absent partition files, blobs, watermarks) rebuild A fresh ledger from the lake's journal partitions doctor Watermarks, export lag, files per table, orphan files, the pre-journal snapshot range, the Bellwether pin and each table's index, sessions counted with no counters row index Bellwether indexes per table under REMATCH_ROOT/lake-index/ with the ADR 001 key table (on demand; never synced) query One key lookup over a lake table → rows (JSON): planned by the table's index and its residual, else a full scan (`indexed: false`) migrate Fill identity fields on rows that predate them (content_sha256 on entries, repo_remote/subpath on predicates and sessions whose repo is on this machine) and (re)apply the domain policy to sessions and entry predicates (idempotent) help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch lake export
Section titled “rematch lake export”Journal rows past this machine's watermark and closed sessions' traces → Parquet
Usage: rematch lake export [OPTIONS]
Options: --all Drain the whole journal and every closed session in one run (default: one bounded run) --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch lake import
Section titled “rematch lake import”Merge another machine's lake (absent partition files, blobs, watermarks)
Usage: rematch lake import [OPTIONS] --from <LAKE>
Options: --from <LAKE> The other lake: its directory, or the REMATCH_ROOT that holds it --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch lake rebuild
Section titled “rematch lake rebuild”A fresh ledger from the lake's journal partitions
Usage: rematch lake rebuild [OPTIONS]
Options: --from <LAKE> Lake to rebuild from (default: REMATCH_ROOT/lake) --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --force Replace a non-empty ledger (the current file is kept as `ledger.sqlite.pre-rebuild-<ms>`) --machine <MACHINE> Machine whose journal to replay (default: this machine's id) -h, --help Print helprematch lake doctor
Section titled “rematch lake doctor”Watermarks, export lag, files per table, orphan files, the pre-journal snapshot range, the Bellwether pin and each table's index, sessions counted with no counters row
Usage: rematch lake doctor [OPTIONS]
Options: --bellwether <PATH> The Bellwether binary (default: $REMATCH_BELLWETHER, else `bellwether` on PATH) --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch lake index
Section titled “rematch lake index”Bellwether indexes per table under REMATCH_ROOT/lake-index/ with the ADR 001 key table (on demand; never synced)
Usage: rematch lake index [OPTIONS] [TABLES]...
Arguments: [TABLES]... Tables to index (default: all): events sessions redirects entries counters proposals receipts outcomes
Options: --bellwether <PATH> The Bellwether binary (default: $REMATCH_BELLWETHER, else `bellwether` on PATH) --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --repin Rebuild every index under this binary's version when the lake pins another one -h, --help Print helprematch lake query
Section titled “rematch lake query”One key lookup over a lake table → rows (JSON): planned by the table's index and its residual, else a full scan (`indexed: false`)
Usage: rematch lake query [OPTIONS] --key <KEY> <TABLE>
Arguments: <TABLE> The table: events sessions redirects entries counters proposals receipts outcomes
Options: --key <KEY> A key of the table (ADR 001 key table), e.g. exact:path, text:tool_cmd, list:facets, temporal2:entry_id --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --values <VALUES> Key values, comma-separated (list keys: elements; a two-column key: `a:b`, split at the last ':') --has <HAS> Text keys (text:tool_cmd): words every row must have, comma-separated, case-folded (`--has cargo,test` finds `cd x && cargo test --workspace`) --from <FROM> Window start (inclusive) on the table's time column: ms UTC, RFC 3339, or YYYY-MM-DD --to <TO> Window end (inclusive), as --from --valid <VALID> The version valid at this instant (temporal2; a temporal key's --at) --known <KNOWN> As the ledger knew it at this instant (temporal2) --latest The newest version per key (with --known: the newest known by then) --all List keys: rows holding every value (default: any) --limit <LIMIT> At most this many rows --bellwether <PATH> The Bellwether binary (default: $REMATCH_BELLWETHER, else `bellwether` on PATH) -h, --help Print helprematch lake migrate
Section titled “rematch lake migrate”Fill identity fields on rows that predate them (content_sha256 on entries, repo_remote/subpath on predicates and sessions whose repo is on this machine) and (re)apply the domain policy to sessions and entry predicates (idempotent)
Usage: rematch lake migrate [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch report
Section titled “rematch report”The kill criterion (ADR 001 L4): kept entries over ≥ 4 matched sessions and recurrence per trigger, with-entry vs before-arm
Usage: rematch report [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --window <WINDOW> Window ending now: `<n>w`, `<n>d` or `<n>h` [default: 6w] --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --since <DAY> Start the window at this UTC day (`YYYY-MM-DD`) instead of `now − window` -h, --help Print helprematch policy
Section titled “rematch policy”REMATCH_ROOT/policy.json: show, declare a repo's domain (domain set|unset), caps (kept_per_domain)
Usage: rematch policy [OPTIONS] <COMMAND>
Commands: show The policy file, the declared domains and caps in effect, and the branch domain.yml domains domain Declare (set) or remove (unset) the domain of a repo remote (or remote glob, or a repo path) caps Caps (`kept_per_domain`: kept entries per top-level domain across branches, default 8) help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch policy show
Section titled “rematch policy show”The policy file, the declared domains and caps in effect, and the branch domain.yml domains
Usage: rematch policy show [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch policy domain
Section titled “rematch policy domain”Declare (set) or remove (unset) the domain of a repo remote (or remote glob, or a repo path)
Usage: rematch policy domain [OPTIONS] <COMMAND>
Commands: set Declare `<domain>` for sessions in `<target>` (a normalized remote, a glob over remotes, or a repo path on this machine) unset Remove the declaration for `<target>` (and `--subpath`) help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch policy domain set
Section titled “rematch policy domain set”Declare `<domain>` for sessions in `<target>` (a normalized remote, a glob over remotes, or a repo path on this machine)
Usage: rematch policy domain set [OPTIONS] <TARGET> <DOMAIN>
Arguments: <TARGET> <DOMAIN>
Options: --subpath <SUBPATH> Only below this toplevel-relative path glob --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch policy domain unset
Section titled “rematch policy domain unset”Remove the declaration for `<target>` (and `--subpath`)
Usage: rematch policy domain unset [OPTIONS] <TARGET>
Arguments: <TARGET>
Options: --subpath <SUBPATH> --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch policy caps
Section titled “rematch policy caps”Caps (`kept_per_domain`: kept entries per top-level domain across branches, default 8)
Usage: rematch policy caps [OPTIONS] <COMMAND>
Commands: set Set a cap help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch policy caps set
Section titled “rematch policy caps set”Set a cap
Usage: rematch policy caps set [OPTIONS] <CAP> <VALUE>
Arguments: <CAP> [possible values: kept_per_domain] <VALUE>
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch tune
Section titled “rematch tune”Predicate tuning: read-but-missed sessions widen a skill's stems, matched-but-unread narrow them; staged as a provisional sibling
Usage: rematch tune [OPTIONS]
Options: --entry <ENTRY> Only this entry (id or name) --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --dry-run Report signals and proposals (and whether each would stage); write nothing --window <WINDOW> Window ending now: `<n>w`, `<n>d` or `<n>h` [default: 6w] -h, --help Print helprematch profile
Section titled “rematch profile”The profile (REMATCH_ROOT/profile, a git repo synced across machines): init, adopt, sync, status, install-launchd
Usage: rematch profile [OPTIONS] <COMMAND>
Commands: init Create REMATCH_ROOT/profile (git init, or clone --remote), then sync it adopt Move one skill dir or agent .md file into the profile, a link left in its place sync Commit local changes, pull --rebase, relink the views, push status Branch, remote, ahead/behind (as of the last fetch), dirty paths, conflicts, machines install-launchd Write ~/Library/LaunchAgents/com.vncp.rematch.profile-sync.plist (not loaded) help Print this message or the help of the given subcommand(s)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch profile init
Section titled “rematch profile init”Create REMATCH_ROOT/profile (git init, or clone --remote), then sync it
Usage: rematch profile init [OPTIONS]
Options: --remote <REMOTE> Git remote to clone (an existing profile) or to push to (an empty one) --text Human-readable output instead of the JSON envelope --adopt Move kept entries, hand-written `<agent_dir>/skills/*` and `<agent_dir>/agents/*.md` into the profile (hand-written skills become pinned entries) --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --timeout <TIMEOUT> Seconds for all network operations together [default: 10] -h, --help Print helprematch profile adopt
Section titled “rematch profile adopt”Move one skill dir or agent .md file into the profile, a link left in its place
Usage: rematch profile adopt [OPTIONS] <PATH>
Arguments: <PATH> A skill directory (holding SKILL.md) or an agent file (`<name>.md`)
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch profile sync
Section titled “rematch profile sync”Commit local changes, pull --rebase, relink the views, push
Usage: rematch profile sync [OPTIONS]
Options: --no-push Commit and pull, but do not push --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) --timeout <TIMEOUT> Seconds for all network operations together (fetch + push); past it the sync reports `offline: true` and goes on with the local state [default: 10] -h, --help Print helprematch profile status
Section titled “rematch profile status”Branch, remote, ahead/behind (as of the last fetch), dirty paths, conflicts, machines
Usage: rematch profile status [OPTIONS]
Options: --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print helprematch profile install-launchd
Section titled “rematch profile install-launchd”Write ~/Library/LaunchAgents/com.vncp.rematch.profile-sync.plist (not loaded)
Usage: rematch profile install-launchd [OPTIONS]
Options: --interval <INTERVAL> Seconds between syncs [default: 300] --text Human-readable output instead of the JSON envelope --cwd <DIR> Directory the command runs against (repo/cwd for match, digest, create, …) -h, --help Print help