From 4e57be809dc0152e8a85940af1b7046f3b89e650 Mon Sep 17 00:00:00 2001 From: Lareb Zafar Date: Tue, 1 Dec 2026 03:27:23 +0530 Subject: [PATCH] The plugin's three skill descriptions fit one short line each A client writes the description of every listed skill into the first request of a session, and every later request reads it again, in every install mode and whether or not the skill loads. The three listed skills (loom-code, loom-memory, loom-mentor) took 1,011 bytes of a recorded first request in code mode, where no measured session loaded a skill. Each description now says when to load its skill and nothing its body says: 160, 148 and 157 bytes, 465 for the three against 950. The body of each skill already holds what left: what the skill settles, the unindexed-repository and uncommitted-file cases, the duplicate-check exclusion and the routing to the other skills. The pinned phrases stay: "NOT for LOCAL-FIRST sessions" and "needs no skill". The plugin test caps a listed description at 160 bytes and the three at 480, and asks each for a "Use when" or "Use before" clause. The Codex and served copies are regenerated; the standalone bundles keep their own descriptions. Both plugins are 1.2.120. Co-Authored-By: Claude Fable 5.2 Signed-off-by: Lareb Zafar --- docs/features/integrations/claude-code.md | 9 ++++---- .../.claude-plugin/plugin.json | 2 +- integrations/claude-code-plugin/README.md | 23 ++++++++++--------- .../skills/loom-code/SKILL.md | 7 +++--- .../skills/loom-memory/SKILL.md | 6 ++--- .../skills/loom-mentor/SKILL.md | 8 +++---- .../claude-code-plugin/tests/skills.test.mjs | 18 +++++++++------ .../codex-plugin/.codex-plugin/plugin.json | 2 +- .../codex-plugin/skills/loom-code/SKILL.md | 7 +++--- .../codex-plugin/skills/loom-memory/SKILL.md | 6 ++--- .../codex-plugin/skills/loom-mentor/SKILL.md | 8 +++---- .../served_skills/loom-code/SKILL.md | 2 +- .../served_skills/loom-memory/SKILL.md | 2 +- server/transport/served_skills/manifest.json | 12 +++++----- 14 files changed, 54 insertions(+), 58 deletions(-) diff --git a/docs/features/integrations/claude-code.md b/docs/features/integrations/claude-code.md index 2b23610c509..a9974078ce7 100644 --- a/docs/features/integrations/claude-code.md +++ b/docs/features/integrations/claude-code.md @@ -400,7 +400,7 @@ the first Loom call of a session costs one tool-search request, and the startup instructions say nothing about the code tools (in code mode there are none). Measured in the opt-in configuration, with `prompt_pack` on, on a scripted session whose prompt carried three pointers, in a project that holds the -pointers block, the plugin adds about 2,400 bytes to the first request in code +pointers block, the plugin adds about 1,900 bytes to the first request in code mode: the three skill descriptions, the tool names, the pointers, the block and the checkout's line. A default install adds no pointers to that request. The three schemas would be about 4,100 bytes more. A server that does not read the @@ -716,7 +716,8 @@ claude plugin install loom@loom --config mode=code neither list and leaves the names of its three resource tools out of the session's requests. - **The three skills are listed in every mode**: a skill's description is fixed text the - client loads at start. + client loads at start. Each says when to load its skill in one line of at most 160 + bytes, 480 for the three. - **The listing needs a server that reads `?mode=`** ([MCP reference](../../reference/mcp.md)). An older server ignores it and lists both planes; the hooks follow the mode either way. @@ -1115,9 +1116,9 @@ the Grep tool and the Bash tool respectively. | Skill | Loads when | Does | | -------------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `loom-code` | about to grep, glob or open files in an indexed repository | which `code.*` op replaces the reflex and how to read its answer | +| `loom-code` | about to grep or open files in an indexed repository | which `code.*` op replaces the reflex and how to read its answer | | `loom-memory` | a fact is stated, decided or corrected; the end of a substantial task | what is durable memory and what is scratchpad, how to write a fact a later session can trust, the end-of-task review | -| `loom-mentor` | a hint names a plane or op you do not know; "what can Loom do" | the situation → plane → op map and what each hint code means | +| `loom-mentor` | which operation serves documents or records; a hint; "what can Loom do" | the situation → plane → op map and what each hint code means | | `loom-optimize` | "optimize my namespace", "memory search is bad", a namespace-health line | `namespace.audit`, a plan the owner approves, `memory.move` with redirects ([guide](../../guides/optimize-namespace.md)) | | `loom-session` | "save this session", "resume", "where was I on this branch" | lists the saved briefs, restores the one the user picks (the brief with the client's compaction summary, or with `--transcript` every recorded turn as well), or saves one; it never loads a brief unasked | | `loom-setup` | only when you run `/loom:loom-setup`; the model cannot load it | writes, updates or removes [the instruction block](#the-instruction-block) in `CLAUDE.md` (`bin/loom-setup.mjs`) | diff --git a/integrations/claude-code-plugin/.claude-plugin/plugin.json b/integrations/claude-code-plugin/.claude-plugin/plugin.json index a1d4f9fddc2..db90e51d699 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.118", + "version": "1.2.120", "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/README.md b/integrations/claude-code-plugin/README.md index 142cf354c37..ffbc1298d09 100644 --- a/integrations/claude-code-plugin/README.md +++ b/integrations/claude-code-plugin/README.md @@ -71,7 +71,8 @@ the plane it uses: `claude plugin install loom@loom --config mode=code`. none after a call that has only memory's. The recording scripts are loaded in every mode, and each checks its plane itself. - **The three skills are listed in every mode.** A skill's description is - fixed text the client loads at start. + fixed text the client loads at start. Each says when to load its skill in + one line of at most 160 bytes, 480 for the three. - **The listing needs a server that reads `?mode=`.** An older server ignores it and lists both planes; the hooks follow the mode either way. - **Other clients** set `LOOM_MODE` for the hooks (the option outranks it @@ -634,16 +635,16 @@ saving is 82%. Eight skills ship with the plugin and load on their triggers: -| Skill | Trigger | What it settles | -| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `loom-code` | about to grep, glob or open files in a loom-indexed repo | which `code.*` op replaces the reflex, how to read a result, when to stop | -| `loom-memory` | about to write a fact; the user states, decides or corrects one; end of a substantial task | durable vs scratchpad, how to write a fact a future session can trust (no laundered inferences, source pointer, same key on change), how to read `memory_id` / `conflict` / `abstain` / `verification`, the end-of-task review | -| `improve-loom-for-my-repo` | end of a session in which loom's code tools missed | turns this session's transcript into reproducible findings for the maintainers | -| `loom-status` | a loom tool answers "unauthenticated" or empty for something the user says was saved; the primer did not appear; "is loom working?"; a hook says it found no Node | read-only checks in order — the hook runtime (`ensure-node.sh --check`), the packaged client check (`bin/loom-client-status.mjs`: server, token, where the token came from, auth, writer grant, stranded captures), plugin and MCP registration — and the one cause and fix | -| `loom-optimize` | "optimize my loom namespace", "audit memory", "my memory search is bad"; a mentor hint naming rows to rework | runs `namespace.audit`, writes a plan the owner approves, reworks rows with `memory.move` so every old key stays readable through a redirect; retires nothing | -| `loom-setup` | only when the user runs `/loom:loom-setup` (Codex: an explicit "set Loom up in this repository" or "remove the Loom block"); a line saying the block is missing is not a request | writes, updates or removes the instruction block in the repository's `CLAUDE.md` (`bin/loom-setup.mjs`), which says when to search the index, or, with `prompt_pack` on, that Loom's pointers arrive with a prompt | -| `loom-session` | only an explicit "save this session", "hand this off", "resume", "where was I on this branch"; a brief the primer mentions is not a request | loads a session brief with what moved in the checkout since it was saved (`bin/loom-brief.mjs get`), or saves one the agent writes from its own context — goal, status, decisions and why, dead ends, done, next steps, files, rules, pointers | -| `loom-mentor` | a hint (a result's `hint`, or a "Loom mentor" line) names a plane or op you do not know how to use; "what can loom do", "am I using loom well" (a hint that names its op needs no skill) | the situation → plane → op table for every plane (code index, tracker record, documents, records, working memory, offload, graph, runs, decisions, procedures, duplicates, conflicts, bisect), what each hint code means and what to do, and `mentor.brief` for the evidence | +| Skill | Trigger | What it settles | +| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `loom-code` | about to grep or open files in a loom-indexed repo | which `code.*` op replaces the reflex, how to read a result, when to stop | +| `loom-memory` | about to write a fact; the user states, decides or corrects one; end of a substantial task | durable vs scratchpad, how to write a fact a future session can trust (no laundered inferences, source pointer, same key on change), how to read `memory_id` / `conflict` / `abstain` / `verification`, the end-of-task review | +| `improve-loom-for-my-repo` | end of a session in which loom's code tools missed | turns this session's transcript into reproducible findings for the maintainers | +| `loom-status` | a loom tool answers "unauthenticated" or empty for something the user says was saved; the primer did not appear; "is loom working?"; a hook says it found no Node | read-only checks in order — the hook runtime (`ensure-node.sh --check`), the packaged client check (`bin/loom-client-status.mjs`: server, token, where the token came from, auth, writer grant, stranded captures), plugin and MCP registration — and the one cause and fix | +| `loom-optimize` | "optimize my loom namespace", "audit memory", "my memory search is bad"; a mentor hint naming rows to rework | runs `namespace.audit`, writes a plan the owner approves, reworks rows with `memory.move` so every old key stays readable through a redirect; retires nothing | +| `loom-setup` | only when the user runs `/loom:loom-setup` (Codex: an explicit "set Loom up in this repository" or "remove the Loom block"); a line saying the block is missing is not a request | writes, updates or removes the instruction block in the repository's `CLAUDE.md` (`bin/loom-setup.mjs`), which says when to search the index, or, with `prompt_pack` on, that Loom's pointers arrive with a prompt | +| `loom-session` | only an explicit "save this session", "hand this off", "resume", "where was I on this branch"; a brief the primer mentions is not a request | loads a session brief with what moved in the checkout since it was saved (`bin/loom-brief.mjs get`), or saves one the agent writes from its own context — goal, status, decisions and why, dead ends, done, next steps, files, rules, pointers | +| `loom-mentor` | unsure which operation serves documents, issue history, queued work or typed records; "what can loom do"; a "Loom mentor" line (a hint that names its op needs no skill) | the situation → plane → op table for every plane (code index, tracker record, documents, records, working memory, offload, graph, runs, decisions, procedures, duplicates, conflicts, bisect), what each hint code means and what to do, and `mentor.brief` for the evidence | The memory skill complements ambient capture: the hooks record what happened (conversation turns included, by the Stop hook); the skill covers the facts diff --git a/integrations/claude-code-plugin/skills/loom-code/SKILL.md b/integrations/claude-code-plugin/skills/loom-code/SKILL.md index 2bb4e1cc609..b7b97d21251 100644 --- a/integrations/claude-code-plugin/skills/loom-code/SKILL.md +++ b/integrations/claude-code-plugin/skills/loom-code/SKILL.md @@ -1,10 +1,9 @@ --- name: loom-code description: > - 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. + Use before you grep or open files to answer how Loom-indexed + code works, where it is defined, who calls it, + what a change touches. NOT for LOCAL-FIRST sessions. --- # loom-code — the indexed answer before the grep reflex diff --git a/integrations/claude-code-plugin/skills/loom-memory/SKILL.md b/integrations/claude-code-plugin/skills/loom-memory/SKILL.md index b4a2f143921..e356212abb1 100644 --- a/integrations/claude-code-plugin/skills/loom-memory/SKILL.md +++ b/integrations/claude-code-plugin/skills/loom-memory/SKILL.md @@ -1,10 +1,8 @@ --- name: loom-memory description: > - 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, not code. Use before you write to Loom, when the user states, + decides or corrects a fact to keep, and at the end of a substantial task. --- # loom-memory — write facts a future session can trust diff --git a/integrations/claude-code-plugin/skills/loom-mentor/SKILL.md b/integrations/claude-code-plugin/skills/loom-mentor/SKILL.md index 99f7a8a2eab..4443f25621a 100644 --- a/integrations/claude-code-plugin/skills/loom-mentor/SKILL.md +++ b/integrations/claude-code-plugin/skills/loom-mentor/SKILL.md @@ -1,11 +1,9 @@ --- name: loom-mentor description: > - 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. + Use when unsure which Loom operation serves documents, issue history, + queued work or typed records, or what Loom can do. A hint naming its op + needs no skill. --- # loom-mentor — the store's advice, and where each plane lives diff --git a/integrations/claude-code-plugin/tests/skills.test.mjs b/integrations/claude-code-plugin/tests/skills.test.mjs index 59e4f3c3e69..3e009363cee 100644 --- a/integrations/claude-code-plugin/tests/skills.test.mjs +++ b/integrations/claude-code-plugin/tests/skills.test.mjs @@ -90,9 +90,10 @@ 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", () => { +test("the skill listing stays within its bytes: three listed skills, one short line each", () => { // 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 + // every session, in every mode, whether or not the skill is used. So a + // description holds when to load the skill and nothing else. Detail // belongs in the body, which loads on use. const root = path.join(here, "..", "skills"); const listed = {}; @@ -101,12 +102,15 @@ test("the skill listing stays within its bytes: three listed skills, short descr 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, " ")); + listed[name] = 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)`); + let total = 0; + for (const [name, text] of Object.entries(listed)) { + const bytes = Buffer.byteLength(text); + assert.ok(bytes <= 160, `${name}: description is ${bytes} bytes (cap 160)`); + assert.match(text, /\bUse (when|before)\b/, `${name}: the description says when to load the skill`); + total += bytes; } - const total = Object.values(listed).reduce((a, b) => a + b, 0); - assert.ok(total <= 1100, `listed descriptions are ${total} bytes (cap 1100)`); + assert.ok(total <= 480, `listed descriptions are ${total} bytes (cap 480)`); }); diff --git a/integrations/codex-plugin/.codex-plugin/plugin.json b/integrations/codex-plugin/.codex-plugin/plugin.json index 804680cbfd6..c5e7dbe1163 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.118", + "version": "1.2.120", "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 2bb4e1cc609..b7b97d21251 100644 --- a/integrations/codex-plugin/skills/loom-code/SKILL.md +++ b/integrations/codex-plugin/skills/loom-code/SKILL.md @@ -1,10 +1,9 @@ --- name: loom-code description: > - 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. + Use before you grep or open files to answer how Loom-indexed + code works, where it is defined, who calls it, + what a change touches. NOT for LOCAL-FIRST sessions. --- # loom-code — the indexed answer before the grep reflex diff --git a/integrations/codex-plugin/skills/loom-memory/SKILL.md b/integrations/codex-plugin/skills/loom-memory/SKILL.md index b4a2f143921..e356212abb1 100644 --- a/integrations/codex-plugin/skills/loom-memory/SKILL.md +++ b/integrations/codex-plugin/skills/loom-memory/SKILL.md @@ -1,10 +1,8 @@ --- name: loom-memory description: > - 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, not code. Use before you write to Loom, when the user states, + decides or corrects a fact to keep, and at the end of a substantial task. --- # loom-memory — write facts a future session can trust diff --git a/integrations/codex-plugin/skills/loom-mentor/SKILL.md b/integrations/codex-plugin/skills/loom-mentor/SKILL.md index 99f7a8a2eab..4443f25621a 100644 --- a/integrations/codex-plugin/skills/loom-mentor/SKILL.md +++ b/integrations/codex-plugin/skills/loom-mentor/SKILL.md @@ -1,11 +1,9 @@ --- name: loom-mentor description: > - 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. + Use when unsure which Loom operation serves documents, issue history, + queued work or typed records, or what Loom can do. A hint naming its op + needs no skill. --- # loom-mentor — the store's advice, and where each plane lives diff --git a/server/transport/served_skills/loom-code/SKILL.md b/server/transport/served_skills/loom-code/SKILL.md index bbe03de4be1..9cfe084eb90 100644 --- a/server/transport/served_skills/loom-code/SKILL.md +++ b/server/transport/served_skills/loom-code/SKILL.md @@ -1,6 +1,6 @@ --- name: loom-code -description: "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." +description: "Use before you grep or open files to answer how Loom-indexed code works, where it is defined, who calls it, what a change touches." --- # loom-code — the indexed answer before the grep reflex diff --git a/server/transport/served_skills/loom-memory/SKILL.md b/server/transport/served_skills/loom-memory/SKILL.md index 89feed442f7..24843ffa948 100644 --- a/server/transport/served_skills/loom-memory/SKILL.md +++ b/server/transport/served_skills/loom-memory/SKILL.md @@ -1,6 +1,6 @@ --- name: loom-memory -description: "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." +description: "Loom memory, not code. Use before you write to Loom, when the user states, decides or corrects a fact to keep, and at the end of a substantial task." --- # loom-memory — write facts a future session can trust diff --git a/server/transport/served_skills/manifest.json b/server/transport/served_skills/manifest.json index a77cd11f10f..bec40fe3c52 100644 --- a/server/transport/served_skills/manifest.json +++ b/server/transport/served_skills/manifest.json @@ -3,13 +3,13 @@ { "frontmatter": { "name": "loom-memory", - "description": "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." + "description": "Loom memory, not code. Use before you write to Loom, when the user states, decides or corrects a fact to keep, and at the end of a substantial task." }, "files": [ { "path": "SKILL.md", - "digest": "sha256:458d16c821cd97e1619bc66224378428ff4d8e4c74e37a251a36d700d6c191cf", - "size": 4371 + "digest": "sha256:b459810822aa3689b7b43ec69d73772a366320cfc948ca1a520f3fa05d8ab929", + "size": 4216 }, { "path": "reference.md", @@ -21,13 +21,13 @@ { "frontmatter": { "name": "loom-code", - "description": "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." + "description": "Use before you grep or open files to answer how Loom-indexed code works, where it is defined, who calls it, what a change touches." }, "files": [ { "path": "SKILL.md", - "digest": "sha256:002dd7dfaee262f123a00ec20a003dd17e7c41b623d8e30116613c481c5809ee", - "size": 3162 + "digest": "sha256:9d43666c8dc77a249946bc5a9a32e457d7d5155ddbc8f2c316b3dca5279a0951", + "size": 3043 }, { "path": "reference.md",