Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/features/integrations/claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ The wiring is `hooks/hooks.json`; `hooks/HOOKS.md` has per-hook notes.
| PostToolUse, PostToolUseFailure (any tool) | `loom-capture.mjs` | one episodic observation per tool call (`observe.record`); a failed call is typed `error` | none |
| Stop, SessionEnd | `loom-conversation.mjs` | appends new chat turns to the conversation plane (`conversation.append`) | `LOOM_CAPTURE_CONVERSATIONS=false` |
| Stop | `loom-usage.mjs` | posts the session's token usage to `cost.record_turns` | `LOOM_USAGE=off` |
| Stop | `loom-test-gate.mjs` | for changes this session made, blocks "done" once with the tests `code.test_gate` says the change obliges, unless your latest prompt ends with "Do not run the tests", or pytest already ran them clean and nothing was edited or run since (exact conditions: **Answered stops** in the plugin README) | `LOOM_TEST_GATE=off` |
| Stop | `loom-test-gate.mjs` | for changes this session made, blocks "done" once with the tests `code.test_gate` says the change obliges, unless your latest prompt ends with "Do not run the tests", or pytest already ran them to its summary line, failures included, and nothing was edited or run since (exact conditions: **Answered stops** in the plugin README) | `LOOM_TEST_GATE=off` |
| Stop | `loom-validate-gate.mjs` | blocks once when `namespace.validate` finds errors or warnings on the memory keys this session wrote | `LOOM_VALIDATE_GATE=off` |
| Stop | `loom-namespace-health.mjs` | on the first Stop, one line when `namespace.audit` finds a critical misuse of the namespace, pointing at the `loom-optimize` skill | `LOOM_NAMESPACE_HEALTH=off` |
| Stop, PreCompact | `loom-working-memory.mjs` | refreshes the working-memory note (`session:<project>`): goal, git status, files edited, last reply | `LOOM_WORKING_MEMORY=off` |
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.62",
"version": "1.2.63",
"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
4 changes: 3 additions & 1 deletion integrations/claude-code-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ the duplicate, run `claude mcp remove <name> -s user`.

**Team file rules.** The file-context hook reads two places in one `memory.for_file` request: your own namespace, and the repository's **primary code namespace** (its trunk branch's — `code-clickhouse` for every ClickHouse branch), named by the checkout's cached `code.repos` entry. A namespace you cannot read is skipped silently, so access follows repository access. Rules from the code namespace render as `Team rule (by alice, 3 days ago) [constraint]: … [id: <key>]` and design decisions (typed or tagged `decision`) as `Decision (by alice, 3 days ago) (pinned): … — source: <source_resource_id> [id: <key>]` (`(pinned)` only when someone pinned it, else no mark; `(source changed)` once its source document no longer says it), a newer rule the conflict check linked to an older one sits above it (`supersedes rule by …`, or `supersedes decision by …`), and one footer line says how to remove a wrong one. Every member of the repository may add a rule there (`memory.set` with `files` and the tag `constraint`) and revise or delete the rules they wrote; a maintainer may delete any — from an agent (`memory.delete` on the `[id:]` key) or from the dashboard (pick the code namespace under _show system_, open the memory, Delete). A refused delete answers a `hint` naming the author and what to do instead. `memory.set` fills `files` from the value when you do not pass it. Auto-extracted session facts never go to the code namespace.

**Answered stops.** The test gate does not block, and so names no untested function, when it names tests, each of them is in the checkout and the transcript already answers the ask to run them, in one of two ways. Your latest prompt ends with the sentence "Do not run the tests" (also `don't` or `never`, and `tests`, `any tests` or `the test suite`). Or the transcript shows a Bash command that ran pytest on each named test, by its file or a directory above it that is below the checkout root, and whose output holds a clean summary line (`N passed`, nothing failed, errored or deselected) for each pytest in it; the command has no `--ignore`, `--deselect`, `--lf` or `--sw` and no quote in pytest's arguments, and from its first pytest on runs only pytest, `tail`, `head`, `grep` and `echo` and holds no backquote and no redirect to a file other than `/dev/null`; the transcript shows no edit-tool call and no other Bash or PowerShell call after that; no tracked file is deleted; and no uncommitted or untracked file was modified later. A run of the whole checkout names no path below the root, so a bare `pytest` and `pytest .` do not answer. Before pytest in its simple command only variable assignments, `env`, `timeout`, `uv run` or `poetry run`, an interpreter's `-m` and a path may stand: `python -u -m pytest tests` and `docker exec app pytest tests` do not answer. Runs in several commands add up only while each later command holds nothing before its first pytest but what launches it: one that does anything else first, a `cd` included, answers for its own runs alone. The word after a pytest flag written without `=` is read as that flag's value, not as a path that ran, unless the flag is a cluster of `-q`, `-v`, `-x`, `-s` and `-l`: `pytest --no-header tests` does not answer. Quotes in the rest of the command are not read, so a `|`, `;` or `>` inside one counts as if unquoted: a run piped into `grep -E "passed|failed"` does not answer.
**Untested functions.** The index's call graph is a floor: a test may reach a function the graph holds no edge to, such as a constructor the test calls by building the object. Beside tests to run that the checkout has, the reason therefore lists the functions as the index's view, `the index links no test to: … (the tests named here may still reach it)`. With no such test it reads `no test reaches: …` and asks for a test.

**Answered stops.** The test gate does not block, and so names no untested function, when it names tests, each of them is in the checkout and the transcript already answers the ask to run them, in one of two ways. Your latest prompt ends with the sentence "Do not run the tests" (also `don't` or `never`, and `tests`, `any tests` or `the test suite`). Or the transcript shows a Bash command that ran pytest on each named test, by its file or a directory above it that is below the checkout root, and whose output holds a whole summary line for each pytest in it: one that counts tests failed or passed and none deselected. A run that failed answers, since the session has read its failures; a collection that stopped at an error (`1 error in 0.12s`) does not, and neither does a line that counts a failure or an error when a pytest in the command has `--exitfirst`, `--maxfail` or a short flag holding `x` (`-x`, `-qx`, also `-rx`), since that run stopped before the files after it. No output answers that holds the line pytest prints above the summary of a run it ended early (`stopping after 1 failures`, `Interrupted: …`), which also shows a limit or `--sw` set in a configuration file or in `PYTEST_ADDOPTS`; `| tail -1` cuts that line, and such a run then answers. The command has no `--ignore`, `--deselect`, `--lf`, `--sw` or `--continue-on-collection-errors` and no quote in pytest's arguments; its runs count from the first pytest after which it runs only pytest, `tail`, `head`, `grep` and `echo` and holds no backquote and no redirect to a file other than `/dev/null`, so the second run of `git stash; pytest tests; git stash pop; pytest tests` answers and no run of `pytest tests; git stash; pytest tests; git stash pop` or of `pytest tests; git diff --stat` does; the transcript shows no edit-tool call and no other Bash or PowerShell call after that; no tracked file is deleted; and no uncommitted or untracked file was modified later. A run of the whole checkout names no path below the root, so a bare `pytest` and `pytest .` do not answer. Before pytest in its simple command only variable assignments, `env`, `timeout`, `uv run` or `poetry run`, an interpreter's `-m` and a path may stand: `python -u -m pytest tests` and `docker exec app pytest tests` do not answer. Runs in several commands add up only while each later command holds nothing before the first of its runs that count but what launches it: one that does anything else first, a `cd` included, answers for its own runs alone. The word after a pytest flag written without `=` is read as that flag's value, not as a path that ran, unless the flag is a cluster of `-q`, `-v`, `-x`, `-s` and `-l`: `pytest --no-header tests` does not answer. Quotes in the rest of the command are not read, so a `|`, `;` or `>` inside one counts as if unquoted: a run piped into `grep -E "passed|failed"` does not answer.

The scripts are standalone Node ESM (`.mjs`) with **zero dependencies** — no Loom
SDK, no `node_modules`. They run on any Node ≥ 18 (global `fetch` +
Expand Down
Loading
Loading