diff --git a/integrations/claude-code-plugin/.claude-plugin/plugin.json b/integrations/claude-code-plugin/.claude-plugin/plugin.json index a5658913df8..65c75e54bbd 100644 --- a/integrations/claude-code-plugin/.claude-plugin/plugin.json +++ b/integrations/claude-code-plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "loom", "displayName": "ClickHouse Loom", - "version": "1.2.79", + "version": "1.2.80", "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" diff --git a/integrations/claude-code-plugin/skills/loom-code/SKILL.md b/integrations/claude-code-plugin/skills/loom-code/SKILL.md index 7032270c39d..2bb4e1cc609 100644 --- a/integrations/claude-code-plugin/skills/loom-code/SKILL.md +++ b/integrations/claude-code-plugin/skills/loom-code/SKILL.md @@ -1,15 +1,10 @@ --- name: loom-code description: > - Use the moment you are about to grep, glob, or open files to answer a - question about a loom-indexed codebase — "where is X", "how does X work", - "who calls Y", "is it safe to change Z", "what does this stack trace - touch". The tell is linguistic: if you just thought "let me search the - codebase", "let me grep for that", or "let me read a few files", that - sentence is the trigger — code.grep covers exact literals too. NOT for - repos loom hasn't indexed (a code.search that abstains on everything is - the tell), and NOT for your own uncommitted files (grep those; pass your - diff to code.impact for blast radius). NOT for LOCAL-FIRST sessions. + Use before you grep, glob or open files to answer a question about a + Loom-indexed codebase: where something is defined, how it works, who calls + it, what a change or a stack trace touches. NOT for unindexed repositories + or your own uncommitted files. NOT for LOCAL-FIRST sessions. --- # loom-code — the indexed answer before the grep reflex @@ -17,6 +12,11 @@ description: > If the startup primer says LOCAL-FIRST, use local grep/Read; the code guard stands down. Use Loom only when asked about upstream, naming the indexed commit. +The thought "let me grep for that" or "let me read a few files" is the cue: +pick a row below; `loom_code_grep` covers exact literals too. A +`loom_code_search` that abstains on everything means the repository is not +indexed: work locally. + Loom indexes this codebase (symbols, call graph, tests, PR history), served as MCP tools. Choose the operation that answers the question; do not call tools just to show use. Static callers and impact can be lower bounds. Follow this routing even diff --git a/integrations/claude-code-plugin/skills/loom-memory/SKILL.md b/integrations/claude-code-plugin/skills/loom-memory/SKILL.md index 9ae9ee06a5f..b4a2f143921 100644 --- a/integrations/claude-code-plugin/skills/loom-memory/SKILL.md +++ b/integrations/claude-code-plugin/skills/loom-memory/SKILL.md @@ -1,15 +1,10 @@ --- name: loom-memory description: > - Use when you are about to write something to Loom, when the user states, - decides or corrects a fact, and at the END of any substantial task before - you report done. Decides what is durable memory versus scratchpad, how to - write a fact so a future session can trust it, how to read what Loom hands - back (persisted or not, conflict, abstain, verified or stale), and how to - run the end-of-task memory review. NOT for code questions (loom-code), - NOT for "is this already reported?" / duplicate or bisect checks (call - loom_search or loom_tracker_duplicate_check directly — nothing to read first) - and NOT for filing loom defects (improve-loom-for-my-repo). + Loom memory, not code. Use before you write anything to Loom, when the user + states, decides or corrects a fact to keep, and to review what to save at + the end of a substantial task. Settles durable versus scratchpad, the shape + of a write and how to read Loom's answer. NOT for duplicate or bisect checks. --- # loom-memory — write facts a future session can trust @@ -19,6 +14,11 @@ and every conversation turn (the Stop hook). Never write the conversation yourself. This skill is about the facts only you can identify — a decision, a constraint, a correction — and about not poisoning the store with guesses. +Not this skill: a code question is `loom-code`; "is this already reported?", +a duplicate or a bisect check is a direct `loom_search` or +`loom_tracker_duplicate_check` call with nothing to read first; a Loom +defect is `improve-loom-for-my-repo`. + Ops are named by their dotted name. A listed one is the tool `loom_` with dots as underscores (`memory.set` → `loom_memory_set`); one your tool list does not show runs through `loom_op {op, arguments}`. diff --git a/integrations/claude-code-plugin/skills/loom-mentor/SKILL.md b/integrations/claude-code-plugin/skills/loom-mentor/SKILL.md index d0b60f419e0..99f7a8a2eab 100644 --- a/integrations/claude-code-plugin/skills/loom-mentor/SKILL.md +++ b/integrations/claude-code-plugin/skills/loom-mentor/SKILL.md @@ -1,32 +1,27 @@ --- name: loom-mentor description: > - Use when selecting a Loom capability for documents, issue history, queued work, - typed records, decisions or procedures and the matching operation is unclear. - Also use when a loom hint (a tool result's `hint`, an `X-Loom-Hint` header or - a "Loom mentor" line) names a plane or op you do not know how to use, or - when the user asks "what can loom do", "how should I be using loom", "am I - using loom well", "loom mentor". A hint that already names the op to call - needs no skill: call it or carry on with the task. Maps a situation to the - loom plane and op that fits — code index, tracker record, documents, - records, working memory, offload, the entity graph, runs, decisions, - procedures, duplicates, conflicts, bisect — and says what to do about each - hint code. NOT for deciding the shape of one write (loom-memory), NOT for - grep-vs-code.* in an indexed repo (loom-code), NOT for reworking a - namespace that already holds the wrong shape (loom-optimize). + Use when Loom should serve documents, issue history, queued work, + typed records, decisions or procedures and you do not know which operation + does, when a Loom hint names a plane or op you do not know how to use, or + when the user asks what Loom can do or whether they use it well. A hint that + names its op needs no skill. NOT for code questions or the shape of a write. --- # loom-mentor — the store's advice, and where each plane lives Loom has a few hundred operations; your tool list shows the ones a coding session uses most. The mentor reads what your agent called this week and -names the plane it is not using: a `hint` on a tool result, a `Loom mentor` -line in the session primer. Read a hint once, act on it once; the same code -is not shown again this session. +names the plane it is not using: a `hint` on a tool result, an `X-Loom-Hint` +header, a `Loom mentor` line in the session primer. Read a hint once, act on +it once; the same code is not shown again this session. A hint that already +names the op to call needs nothing from here: call it or carry on. -This skill routes. The destination skill owns the detail: the shape of a -write is `loom-memory`, code questions are `loom-code`, reworking stored -rows is `loom-optimize`. +This skill routes a situation to the plane and op that fits: code index, +tracker record, documents, records, working memory, offload, the entity +graph, runs, decisions, procedures, duplicates, conflicts, bisect. The +destination skill owns the detail: the shape of a write is `loom-memory`, +code questions are `loom-code`, reworking stored rows is `loom-optimize`. Use the relevant available capability without waiting for a hint. Prefer a fitting listed tool directly; reuse sufficient context and skip unnecessary diff --git a/integrations/claude-code-plugin/tests/skills.test.mjs b/integrations/claude-code-plugin/tests/skills.test.mjs index 60a634f578f..59e4f3c3e69 100644 --- a/integrations/claude-code-plugin/tests/skills.test.mjs +++ b/integrations/claude-code-plugin/tests/skills.test.mjs @@ -89,3 +89,24 @@ test("every plugin skill's SKILL.md stays under the size a host reads whole; lon } assert.match(mentor, /toolset=tracker/); }); + +test("the skill listing stays within its bytes: three listed skills, short descriptions", () => { + // The client puts every listed skill's description in the first request of + // every session, in every mode, whether or not the skill is used. Detail + // belongs in the body, which loads on use. + const root = path.join(here, "..", "skills"); + const listed = {}; + for (const name of fs.readdirSync(root)) { + const frontmatter = fs.readFileSync(path.join(root, name, "SKILL.md"), "utf8").split("\n---\n")[0]; + if (/^disable-model-invocation:\s*true\s*$/m.test(frontmatter)) continue; + const folded = frontmatter.match(/^description: >\n((?: {2}.*\n?)+)/m); + assert.ok(folded, `${name}: a folded description`); + listed[name] = Buffer.byteLength(folded[1].trim().replace(/\s*\n\s*/g, " ")); + } + assert.deepEqual(Object.keys(listed).sort(), ["loom-code", "loom-memory", "loom-mentor"]); + for (const [name, bytes] of Object.entries(listed)) { + assert.ok(bytes <= 400, `${name}: description is ${bytes} bytes (cap 400)`); + } + const total = Object.values(listed).reduce((a, b) => a + b, 0); + assert.ok(total <= 1100, `listed descriptions are ${total} bytes (cap 1100)`); +}); diff --git a/integrations/codex-plugin/.codex-plugin/plugin.json b/integrations/codex-plugin/.codex-plugin/plugin.json index ce5b808ddd6..d5be84d8b92 100644 --- a/integrations/codex-plugin/.codex-plugin/plugin.json +++ b/integrations/codex-plugin/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "loom", - "version": "1.2.79", + "version": "1.2.80", "description": "Shared long-term memory and code intelligence for Codex, 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" diff --git a/integrations/codex-plugin/skills/loom-code/SKILL.md b/integrations/codex-plugin/skills/loom-code/SKILL.md index 7032270c39d..2bb4e1cc609 100644 --- a/integrations/codex-plugin/skills/loom-code/SKILL.md +++ b/integrations/codex-plugin/skills/loom-code/SKILL.md @@ -1,15 +1,10 @@ --- name: loom-code description: > - Use the moment you are about to grep, glob, or open files to answer a - question about a loom-indexed codebase — "where is X", "how does X work", - "who calls Y", "is it safe to change Z", "what does this stack trace - touch". The tell is linguistic: if you just thought "let me search the - codebase", "let me grep for that", or "let me read a few files", that - sentence is the trigger — code.grep covers exact literals too. NOT for - repos loom hasn't indexed (a code.search that abstains on everything is - the tell), and NOT for your own uncommitted files (grep those; pass your - diff to code.impact for blast radius). NOT for LOCAL-FIRST sessions. + Use before you grep, glob or open files to answer a question about a + Loom-indexed codebase: where something is defined, how it works, who calls + it, what a change or a stack trace touches. NOT for unindexed repositories + or your own uncommitted files. NOT for LOCAL-FIRST sessions. --- # loom-code — the indexed answer before the grep reflex @@ -17,6 +12,11 @@ description: > If the startup primer says LOCAL-FIRST, use local grep/Read; the code guard stands down. Use Loom only when asked about upstream, naming the indexed commit. +The thought "let me grep for that" or "let me read a few files" is the cue: +pick a row below; `loom_code_grep` covers exact literals too. A +`loom_code_search` that abstains on everything means the repository is not +indexed: work locally. + Loom indexes this codebase (symbols, call graph, tests, PR history), served as MCP tools. Choose the operation that answers the question; do not call tools just to show use. Static callers and impact can be lower bounds. Follow this routing even diff --git a/integrations/codex-plugin/skills/loom-memory/SKILL.md b/integrations/codex-plugin/skills/loom-memory/SKILL.md index 9ae9ee06a5f..b4a2f143921 100644 --- a/integrations/codex-plugin/skills/loom-memory/SKILL.md +++ b/integrations/codex-plugin/skills/loom-memory/SKILL.md @@ -1,15 +1,10 @@ --- name: loom-memory description: > - Use when you are about to write something to Loom, when the user states, - decides or corrects a fact, and at the END of any substantial task before - you report done. Decides what is durable memory versus scratchpad, how to - write a fact so a future session can trust it, how to read what Loom hands - back (persisted or not, conflict, abstain, verified or stale), and how to - run the end-of-task memory review. NOT for code questions (loom-code), - NOT for "is this already reported?" / duplicate or bisect checks (call - loom_search or loom_tracker_duplicate_check directly — nothing to read first) - and NOT for filing loom defects (improve-loom-for-my-repo). + Loom memory, not code. Use before you write anything to Loom, when the user + states, decides or corrects a fact to keep, and to review what to save at + the end of a substantial task. Settles durable versus scratchpad, the shape + of a write and how to read Loom's answer. NOT for duplicate or bisect checks. --- # loom-memory — write facts a future session can trust @@ -19,6 +14,11 @@ and every conversation turn (the Stop hook). Never write the conversation yourself. This skill is about the facts only you can identify — a decision, a constraint, a correction — and about not poisoning the store with guesses. +Not this skill: a code question is `loom-code`; "is this already reported?", +a duplicate or a bisect check is a direct `loom_search` or +`loom_tracker_duplicate_check` call with nothing to read first; a Loom +defect is `improve-loom-for-my-repo`. + Ops are named by their dotted name. A listed one is the tool `loom_` with dots as underscores (`memory.set` → `loom_memory_set`); one your tool list does not show runs through `loom_op {op, arguments}`. diff --git a/integrations/codex-plugin/skills/loom-mentor/SKILL.md b/integrations/codex-plugin/skills/loom-mentor/SKILL.md index d0b60f419e0..99f7a8a2eab 100644 --- a/integrations/codex-plugin/skills/loom-mentor/SKILL.md +++ b/integrations/codex-plugin/skills/loom-mentor/SKILL.md @@ -1,32 +1,27 @@ --- name: loom-mentor description: > - Use when selecting a Loom capability for documents, issue history, queued work, - typed records, decisions or procedures and the matching operation is unclear. - Also use when a loom hint (a tool result's `hint`, an `X-Loom-Hint` header or - a "Loom mentor" line) names a plane or op you do not know how to use, or - when the user asks "what can loom do", "how should I be using loom", "am I - using loom well", "loom mentor". A hint that already names the op to call - needs no skill: call it or carry on with the task. Maps a situation to the - loom plane and op that fits — code index, tracker record, documents, - records, working memory, offload, the entity graph, runs, decisions, - procedures, duplicates, conflicts, bisect — and says what to do about each - hint code. NOT for deciding the shape of one write (loom-memory), NOT for - grep-vs-code.* in an indexed repo (loom-code), NOT for reworking a - namespace that already holds the wrong shape (loom-optimize). + Use when Loom should serve documents, issue history, queued work, + typed records, decisions or procedures and you do not know which operation + does, when a Loom hint names a plane or op you do not know how to use, or + when the user asks what Loom can do or whether they use it well. A hint that + names its op needs no skill. NOT for code questions or the shape of a write. --- # loom-mentor — the store's advice, and where each plane lives Loom has a few hundred operations; your tool list shows the ones a coding session uses most. The mentor reads what your agent called this week and -names the plane it is not using: a `hint` on a tool result, a `Loom mentor` -line in the session primer. Read a hint once, act on it once; the same code -is not shown again this session. +names the plane it is not using: a `hint` on a tool result, an `X-Loom-Hint` +header, a `Loom mentor` line in the session primer. Read a hint once, act on +it once; the same code is not shown again this session. A hint that already +names the op to call needs nothing from here: call it or carry on. -This skill routes. The destination skill owns the detail: the shape of a -write is `loom-memory`, code questions are `loom-code`, reworking stored -rows is `loom-optimize`. +This skill routes a situation to the plane and op that fits: code index, +tracker record, documents, records, working memory, offload, the entity +graph, runs, decisions, procedures, duplicates, conflicts, bisect. The +destination skill owns the detail: the shape of a write is `loom-memory`, +code questions are `loom-code`, reworking stored rows is `loom-optimize`. Use the relevant available capability without waiting for a hint. Prefer a fitting listed tool directly; reuse sufficient context and skip unnecessary