Skip to content
10 changes: 8 additions & 2 deletions docs/features/integrations/claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,13 @@ file lifts the rule on its path, not the rule on definitions. A test counts when
request asks for tests or the prompt names the test's file. For a request that asks for tests
module-level code, and a unit of a source file the index could not parse, count too: a
pytest fixture in `conftest.py` and a CI definition written as assignments are
module-level code outside any test directory. The hook reads whether a request asks for
module-level code outside any test directory. The same units, among them the lines of a
class outside its methods (the index chunks them as it chunks module-level code), count
as the first result of a [picked answer](#model-picked-pointers-for-a-bug-report). The
pick model's candidates hold such units, and it read the request against them before it
put that one first; a fix can be made outside any definition, in a setting or a class
attribute. The results below the first are held to definitions: the reply marks none of
them as a pick. The hook reads whether a request asks for
tests as the search ranking does: from every search term (a word or a part of an
identifier) of a request of at most 48 terms, and from the first 16 of a longer one, so
an issue that names a test where the fault showed does not ask for tests. Whether a
Expand Down Expand Up @@ -1083,7 +1089,7 @@ The wiring is `hooks/hooks.json`; `hooks/HOOKS.md` has per-hook notes.
| Event | Script | Effect | Off switch |
| ------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| SessionStart | `loom-session-start.mjs` | one budgeted `context.pack` primer (working-memory note, profile, the session's memory stack, recent runs with `LOOM_CONTEXT_RUNS`; and the memories, decisions and procedures a search for the project finds or, where a new or cleared conversation's prompts get the recall, the pinned and newest ones, listed), one line naming an indexed checkout's code namespace and the repository's memory tag (left out in a new session whose MCP connection carries the checkout: the server then applies both), a line naming the project's saved session briefs, a task-inbox line (`task.counts`), a few lines naming the collections the token can read (`collection.list`), and a line when [the instruction block](#the-instruction-block) needs setup | `LOOM_INJECT_CONTEXT=false`, `LOOM_CODE_MAP=false`, `LOOM_TASK_INBOX_LINE=off`, `LOOM_COLLECTIONS_LINE=off`, `LOOM_SETUP_LINE=off` |
| UserPromptSubmit | `loom-prompt-pack.mjs` | no request with `prompt_pack` off; at its default no prompt text unless this Loom holds the checkout's own repository ([what a prompt gets](#what-a-prompt-gets)); otherwise up to three `code.search` pointers for the prompt, only when the index rates its answer low-risk or the pick worded it `high` or `medium` (with `LOOM_PROMPT_PACK_MIN_CONF` set, from that confidence instead) and then only the answer's places to edit, one pointer per place: a definition, a unit of a file the hook does not hold to definitions, a document or a test when the prompt names it or asks for documentation or tests, a Python migration or a release script only if named, and module-level code when it asks for tests; below them the test line for a pointer whose definition the prompt names ([the test gate](#the-test-gate)) | off unless `prompt_pack` or `LOOM_PROMPT_PACK=on`; `LOOM_PROMPT_CONTEXT=off` |
| UserPromptSubmit | `loom-prompt-pack.mjs` | no request with `prompt_pack` off; at its default no prompt text unless this Loom holds the checkout's own repository ([what a prompt gets](#what-a-prompt-gets)); otherwise up to three `code.search` pointers for the prompt, only when the index rates its answer low-risk or the pick worded it `high` or `medium` (with `LOOM_PROMPT_PACK_MIN_CONF` set, from that confidence instead) and then only the answer's places to edit, one pointer per place: a definition, a unit of a file the hook does not hold to definitions, a document or a test when the prompt names it or asks for one, a Python migration or a release script only if named, and module-level code when it asks for tests or as a first pick; below them the test line for a pointer whose definition the prompt names ([the test gate](#the-test-gate)) | off unless `prompt_pack` or `LOOM_PROMPT_PACK=on`; `LOOM_PROMPT_CONTEXT=off` |
| UserPromptSubmit | `loom-prompt-recall.mjs` | one bounded `context.pack` recall for the prompt (memories, decisions, procedures), injected only when memory does not abstain: whole records, and none of code as it was before a commit the checkout already has; of a record linked to a file of the checkout that the prompt does not name, one line: its key and the file | `LOOM_PROMPT_RECALL=first` (default) / `on` / `off`; `LOOM_PROMPT_CONTEXT=off` |
| UserPromptSubmit | `loom-run.mjs` | opens the session's run (`run.begin`, `run_id = cc-<session_id>`, goal = the first prompt); the prompt does not wait for it | `LOOM_RUN_LEDGER=off` |
| PreToolUse (Read, Grep; Bash for a command that runs `gh`) | `loom-code-shunt.mjs` | the code shunt and the tracker shunt ([next section](#the-code-shunt)) | `LOOM_CODE_SHUNT=off`, `LOOM_TRACKER_SHUNT=off` |
Expand Down
4 changes: 4 additions & 0 deletions docs/guides/issue-code-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ What the plugins do and the SDKs do not:
`Cause (a candidate a model wrote from the indexed code, not checked): <sentence>`.
An SDK's answer has no
pick and so no sentence: its block ends with its last pointer.
- **Count a first pick outside the definitions as a place.** The first result of an
answer the pick model words `high` or `medium` is a place also when it is module-level
code or the lines of a class outside its methods. An SDK's answer has no pick, so the
rule for its first result is the rule for every result.
- **The install's options.** The test line under the pointers reads the checkout, and
`LOOM_PROMPT_PACK_MIN_CONF` changes the gate. The SDK method has the default gate and
no test line.
Expand Down
2 changes: 1 addition & 1 deletion integrations/claude-code-plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loom",
"displayName": "ClickHouse Loom",
"version": "1.2.181",
"version": "1.2.183",
"description": "Shared long-term memory and code intelligence for Claude Code, self-hosted on ClickHouse. MCP tools to save and recall decisions, preferences and corrections across sessions and teammates; lifecycle hooks that capture each session with no model call; a code index that answers where-is, who-calls and blast-radius questions with line-accurate units instead of whole-file reads.",
"author": {
"name": "ClickHouse"
Expand Down
Loading
Loading