Skip to content

An agent-instructions page gives agents without a plugin one block: load Loom's context at each task and edit, save facts, use the code index - #616

Merged
zlareb1 merged 26 commits into
mainfrom
docs/agent-instructions
Nov 13, 2026
Merged

zlareb1 merged 26 commits into
mainfrom
docs/agent-instructions

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

A new page, Agent instructions, gives a short block to paste into an agent's instruction file. It tells the agent to load Loom's context at the start of each task and before each edit, when to save a fact, and when to use the code index rather than grep. The page also says which file each client reads it from: AGENTS.md, CLAUDE.md, Cursor, Devin Desktop, Cline, Zed and GitHub Copilot.

Why

A client connected over plain MCP gets the loom_* tools but no guidance on when to call them. Offering recall as one more tool is not enough: in a session without hooks nothing prompts the agent to recall, and a listed memory tool is one choice among many, so context has to be put in front of the model, as the plugins' hooks do. The block therefore makes two calls part of every task: context.pack at its start, and memory.for_file before an edit, mirroring the session-start and file-context hooks. The Claude Code and Codex plugins teach that through their loom-memory and loom-code skills, and every other client had nothing. The Codex page carried a four-line AGENTS.md contract, but it named op names rather than tool names and had no code-namespace line, which a client without the plugin's scope header needs.

Scope and risk

Documentation only. The new page is docs/features/integrations/agent-instructions.md, which llms.txt now lists. It holds one block that every client shares, plus a table giving each client's file and header. The block is the short form of the loom-memory and loom-code skills, and the page links to both. Each client's setup section links to the page: the MCP clients page ("Plugin or plain MCP", "Claude Code without the plugin", "Codex without the plugin"), Cursor, VS Code and the integrations index (a Map row and the Coding agents list). The Codex page's own short contract is replaced by a link, and its section is renamed "AGENTS.md without the plugin", so only one version exists. With a plugin, the skills carry the contract, and the page is for clients without one.

The rule-file table follows each client's own documentation, read for this PR:

  • Cursor: .cursor/rules/*.mdc with alwaysApply: true (cursor.com/docs/context/rules).
  • Devin Desktop, formerly Windsurf: .devin/rules/*.md with trigger: always_on (docs.devin.ai/desktop/cascade/memories).
  • Cline: the .clinerules/ directory, no frontmatter (docs.cline.bot/features/cline-rules).
  • VS Code: .github/copilot-instructions.md, no frontmatter (code.visualstudio.com/docs/copilot/customization/custom-instructions).
  • Zed: only the first instruction file it finds, in its order (.rules, .cursorrules, .windsurfrules, .clinerules, .github/copilot-instructions.md before AGENTS.md), so the table gives it a row of its own (zed.dev/docs/ai/instructions).

Most of these clients also read AGENTS.md, and the page says to keep one copy of the block where one file serves several clients; with an AGENTS.md in the repository, CLAUDE.md imports it (@AGENTS.md) rather than holding a second copy. The table covers the coding clients loom install sets up (all but Claude Desktop, which has no repository rule file) plus any agent that reads AGENTS.md.

What the block tells an agent:

  • Make two calls, unless a Loom hook already put Loom's context in the session (with the plugins, the block's calls would repeat their hooks): context.pack at the start of each task, and memory.for_file (through loom_op) before each edit.
  • Save stated facts one per key, and send a rule stated for the whole team about a file to the team namespace, with files and the constraint tag, as the loom-memory skill does.
  • Revise a fact with memory.update on the same key in the namespace the row lives in, and for a team rule or decision someone else wrote, follow the refusal's hint. The plan and checklist for the task go to working_memory.set.
  • Use the code index before grep, with the code namespace.
  • Find any op it does not see listed with loom_op help and a query.

The page also shows how a person fills in the two namespaces:

  • code.repos (a curl call) gives each branch's namespace and the trunk's primary_namespace.
  • A repository with no readable row, or a deployment with code intelligence off, takes the block without the team-namespace parts and the Code section.

The block names only tools that the coding toolset lists, plus loom_op for the rest, and the page says to connect on ?toolset=coding. For the same reason, vscode.md's loom install example now passes --toolset coding, and its hand-written entry uses ?toolset=coding. The dashboard's Connect dialog and the single-user install links still give VS Code the server default (vscode is not in CODING_CLIENTS). Under that default the block's code tools are reached through loom_op, as the block says.

The docs map (docs/index.md), the connect guide and the agent-integration guide (§7) now link the page.

loom install --client X does not offer to write the snippet. The page asks for a paste instead, which leaves an existing rule file alone.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: revert the commit.

Tests

On the head commit (re-run at every push):

  • pytest tests/unit/test_doc_links.py tests/unit/test_agent_instructions.py: 434 passed.
  • pytest tests/unit/test_public_copy.py: 5 passed.
  • [email protected] on the changed pages: clean.
  • python -m scripts.codegen.docs_reference: only llms.txt changed, for the new page's line.
  • check_prose.py on the new page: clean.
  • Every tool name in the block checked against server/operations/toolsets.py (_MCP_CODING_OPS, _MCP_CODE_CORE_OPS, and the synthetic loom_search / loom_op).
  • context.pack and memory.for_file inputs checked against server/memory/api/models_context.py and models_for_file.py.
  • The hooks the block mirrors checked: loom-session-start.mjs and loom-file-context.mjs.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. I checked the tool names against the toolset rosters and the links against the doc-link test.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass (docs only: the doc tests above ran; CI runs the rest).
  • Generated files are regenerated in this PR, not by hand.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

zlareb1 and others added 8 commits November 13, 2026 14:12
…to recall, save and use the code index, and the file each client reads it from

Clients without the Claude Code or Codex plugin get the loom_* tools but no guidance on when to call them; the block is the short form of the loom-memory and loom-code skills.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…toolset for clients loom install does not cover, and links the skills on GitHub

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… docs map, connect guide and agent-integration guide link it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…the Codex section's heading says what it holds

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…h task and before each edit, and says how a tool name maps to an op

Agents without hooks rarely call a memory tool on their own, so the block makes context.pack and memory.for_file part of every task, as the plugins' hooks do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…namespace, and the agent-integration guide keeps its end-of-task review

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…s the end-of-task review; the Codex page keeps the block out of the global AGENTS.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…Devin Desktop's rules path, and says a repository without an index drops the code lines

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 force-pushed the docs/agent-instructions branch from 0d50277 to b48c0af Compare November 13, 2026 14:19
zlareb1 and others added 18 commits November 13, 2026 14:27
… page shows how a person runs code.repos, and the skills go beside the block

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…, and an unreadable code.repos row counts as none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…w, and the Devin Desktop row names only its rules file

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ready loaded context, and names where a team file rule goes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…mespace, names what the loom skill covers, and names Devin Desktop's older name

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… code.repos lists repositories the token can join too, and the table says which builds read which file

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…n file it finds

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…epository with no instruction file

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…in MCP to copy the end-of-task review

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…nd names the branch whose namespace goes in the file

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…, and an unreadable code.repos row may be one to adopt

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…oolset, and the block's op-name example names the connection it applies to

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…es its namespace

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…le someone else wrote, and the table says to keep the block in one file

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…team rule, and the Cursor and VS Code pages keep the block in one file

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…er than holding a second copy

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…e serves several clients, and says how CLAUDE.md imports AGENTS.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… the agent-instructions page does

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1 zlareb1 changed the title An agent-instructions page gives one block that tells any agent when to recall, save and use the code index, and the file each client reads it from An agent-instructions page gives agents without a plugin one block: load Loom's context at each task and edit, save facts, use the code index Nov 13, 2026
@zlareb1
zlareb1 merged commit 115e0b0 into main Nov 13, 2026
42 of 43 checks passed
@zlareb1
zlareb1 deleted the docs/agent-instructions branch November 13, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant