Skip to content

Guide: Commands

github-actions[bot] edited this page Oct 12, 2026 · 6 revisions

Slash commands

Thatch ships /thatch/* commands you run yourself, on top of the nudges the plugin fires on its own schedule. The nudge-backed commands (defrag, extract, hygiene, reflect) share their instruction text with the nudges, so a behavior works the same whether it fires automatically or you invoke it. The remaining commands (refine, self-review, peer-review, whois) stand alone.

Commands

  • /thatch/defrag — find duplicate-candidate memory pairs and clusters, classify each one, consolidate duplicates, and mark the rest checked. Text after the command narrows the scope (for example, a store name).
  • /thatch/extract — drain the extraction queue now, instead of waiting for the next nudge or idle-time extraction. opencode only.
  • /thatch/hygiene — run the hygiene report and act on it: stale memories, memories scoped to deleted branches, and pending dedup pairs. The agent asks before forgetting anything that may still matter.
  • /thatch/reflect — run the session-reflection skill to persist what the current session learned.
  • /thatch/whois — report the current session's chat identity: its handle, topic, project, and whether it runs in the project root or a worktree. Text after the command looks up another session instead (by handle or session id) — this is how you map a handle from the roster to the tab you see: the topic is the session's live title. opencode only.
  • /thatch/refine — refine a plan for a code change under the current project type's requirements: the agent classifies the project (team, personal, shared library, spike, infrastructure, or open source contribution), confirms the pick, and runs the refinement loop with that type's expectations applied. Project type relaxes round counts and documentation bars, never the deep-mode triggers. Text after the command can name the type directly (for example, /thatch/refine shared-lib) to skip classification.
  • /thatch/peer-review — review another author's change: the full review pipeline with findings weighted for org velocity. Text after the command names the review target (for example, /thatch/peer-review 1234 for a PR). The review walks the project's persistent memory for incidents, constraints, and footguns the author could not have known, and checks them against the change. Settled designs are not re-litigated, and "if someone changes this later it breaks" findings are never reported. See code-review.md.
  • /thatch/self-review — review your own completed work before submitting it: the full review pipeline weighted for reputation and simplicity. Takes the same target argument as peer-review. Rounds iterate (fix or decline each finding, then re-review the updated state) until a round produces no meaningful findings, at most three. See code-review.md.
  • /thatch/compact and /thatch/exit — the wrap-up commands. They run a pre-flight checklist (flush extraction, finish promised memory writes, surface loose ends) before a compaction or an exit, gated by a greenlight token. opencode only; the greenlight mechanics are described in the user guide overview.

Host support

Command opencode Claude Code Cursor
/thatch/defrag yes yes yes (as an MCP prompt)
/thatch/extract yes no no
/thatch/hygiene yes yes yes (as an MCP prompt)
/thatch/reflect yes yes yes (as an MCP prompt)
/thatch/whois yes no no
/thatch/refine yes yes yes (as an MCP prompt)
/thatch/peer-review yes yes yes (as an MCP prompt)
/thatch/self-review yes yes yes (as an MCP prompt)
/thatch/compact, /thatch/exit yes no no

Why the gaps: /thatch/extract and /thatch/whois need the invoking session's ID, which only the opencode plugin can supply. The wrap-up commands trigger host actions (the compaction and the session close-out) through the plugin. Cursor has no file-based commands; its prompts come from the MCP server (prompts/list and prompts/get).

Installation

  • opencode: installed by the plugin on every load.
  • Claude Code: installed by thatch setup --claude into the same scope as the skills (.claude/commands/thatch/ project-local, or the Claude config dir for --global). Re-run setup to refresh after an upgrade.

Tool names inside the command text follow each host's spelling (thatch_memory_remember on opencode, mcp__thatch__memory_remember on Claude Code and Cursor).

Clone this wiki locally