Repository navigation
The docs say what a team namespace's sessions, packs, counters and policies do - #2200
Merged
Merged
Conversation
…licies do A team that shares one namespace could not predict these behaviours from the pages, and one statement contradicted the code. - identities-and-namespaces: loom_search reads all_mine by default, a pack's memories section follows the deployment's default scope, and a scoped token's tiered search stops at the first namespace whose best match reaches the tier stop similarity. loom_search and context.pack do not share one fan-out. - namespaces-and-sharing, mcp-clients: the guide section's budget in characters, the field that raises it per call, and that the MCP primer holds no guide. - writing: the coding plugins' file block asks by the checkout's repo tags. - cost-and-usage: which counters move for a team on the coding plugins, and why recall_count stays at 0 without a named consumer. - conflicts-and-refusal: a blacklist pattern is matched against the value's stored JSON text. - the Claude Code plugin README, retention-and-erasure: the hand-off's caps, LOOM_OBSERVE_SKIP_TOOLS replaces the default list, and run retention deletes nothing and acts when the run closes. - namespaces-and-sharing: a section for a namespace a team shares, with a setup recipe and two monitoring recipes. - extraction: two settings that get more facts under an operator policy. - headless-bots: how each bot on a shared runner gets its own token. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…tch a pattern as plain text - docs/concepts/identities-and-namespaces.md: a `context.pack` with a `query` searches memory under the deployment's default scope. With none, a `startup` pack lists the addressed namespace's pinned and newest rows whatever the default, and a pack in another mode has no `memories` section. - docs/features/memory/conflicts-and-refusal.md: a blacklist pattern is matched against the stored JSON text on `memory.set`, `memory.update` and the bulk and extraction paths. `observe.record` checks a narrative that holds a string tool field as sent, and `decision.record` checks its fields as plain text, so a pattern for a non-ASCII word, a quote or a line break is added in both spellings. - docs/features/namespaces-and-sharing.md: the sentence that the MCP primer holds no guide follows the list of ways the guide reaches agents. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…plain text a pattern matches An observation's narrative holds a tool input or output that is not a string as its JSON text, where a non-ASCII character is its escape. The Limits bullet called the whole narrative plain text, which contradicts the blacklist section it links to. It names the string tool fields, as that section does. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
integrations/claude-code-plugin/README.md conflicts in the hook table, in the `loom-session-memory.mjs` row. The row keeps main's sentence on the test cost row that the SessionEnd hand-off carries, and this branch's bounds on the turns it sends: the last 200, each cut at 6,000 characters, the oldest dropped until the text fits 120,000 characters (`MAX_TURNS`, `MAX_MESSAGE_CHARS` and `MAX_TOTAL_CHARS` in `lib/session-memory.mjs`). Every other row of the table is main's. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…reject rows only The section on a namespace a team shares counts accepted and rejected proposals from the audit trail. The owner's automatic policy only rejects, at `reject_after_fails` failed graded runs, and an acceptance is an administrator's `memory.proposal_decide`. The sentence on where the audit rows come from says which caller writes which row, as the `proposal_policy` row of the same page does: an administrator's decision leaves a `memory.proposal_accept` or a `memory.proposal_reject` row, the policy a `memory.proposal_reject` row. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #1232
Changelog category (leave one):
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):
Not required.
Why
A team that shares one namespace cannot predict ten behaviours from the pages: one statement contradicts the code, and nine leave out what a reader needs. Each fix is a paragraph and one reader's path crosses all of them, so they are one change.
docs/concepts/identities-and-namespaces.mdnamespace_scopereads, per reader.memory.searchandmemory.askreadthisunless the deployment's default isall_mine.loom_searchreadsall_mine.context.packtakes no scope. With aquery, itsmemoriessection is a search that follows the deployment's default; with none, astartuppack lists the addressed namespace's pinned and newest rows whatever the default. Itsknowledgeandconversationssections readall_mine. The page saidloom_searchandcontext.packuse the same fan-out. A scoped token's tiered search stops at the first namespace whose best match reachesLOOM_MEMORY_SEARCH_TIER_STOP_SIMILARITY(0.40).docs/features/namespaces-and-sharing.md,docs/features/integrations/mcp-clients.mdnamespace.guide_getin that line.section_token_budgetsraises the budget for one call. The MCP primer holds no guide.docs/features/memory/writing.mdrepo:<id>tags, so a row saved withfilesand without the tag is not in it, and which writers add the tag.docs/features/observability/cost-and-usage.mdrecall_countandnamespace.summary'srecent_recallsstay at 0, what a named consumer changes, and which figures do move.docs/features/memory/conflicts-and-refusal.mdmemory.set,memory.updateand the bulk and extraction paths a blacklist pattern is matched against the value's stored JSON text, with the escapes a substring and a regex must spell. An observation's string tool fields and a decision's fields are matched as plain text, so a pattern for a non-ASCII word, a quote or a line break is added in both spellings.integrations/claude-code-plugin/README.md,docs/features/memory/retention-and-erasure.mdLOOM_OBSERVE_SKIP_TOOLSvalue replaces the default list.run.complete'sretaindeletes nothing, keepsepisodicandreflectionrows, and acts when the run closes.docs/features/namespaces-and-sharing.mdnewest_winsdoes for several writers, kinds as tags, what a laternamespace.registerneeds, and two monitoring recipes (writers per week frominsights.query, the share of proposals accepted fromaudit.list).docs/features/memory/extraction.mdcoverage_sweepon the namespace and a call'sextraction_instructions.docs/guides/headless-bots.mdLOOM_CONFIG_FILE, or the MCP entry mounted beside the plugin.Each statement was read in the code first. Where the code says more than the gap this change set out to close, the page follows the code:
loom_searchruns as well as bymemory.search. The cost page therefore says what a credit needs (a named consumer, and a run, a session or a closer), not that one op alone credits.recent_recallsdoes countmemory.searchcalls alone.memory.for_filenames no agent, so the plugins' pre-edit block adds a served row only for a named consumer.memory.setthat merges into a stored row raisesevidence_countonly underauto_reinforce. Amemory.bulk_setentry raises it undernewest_winstoo, and an extraction that restates a stored row records the same event (server/memory/app/pipeline.py,_reinforce_restated).run.completeruns. Nothing onmainapplies it to a row written later, so both pages say a fact extracted after the run closed is not touched.created_atin thememorytable thatinsights.queryreads is the row's first write. The weekly recipe therefore counts new memories, under theactorof each row's current version.\uis refused as an invalid pattern, so the page shows the escaped form.observe.recordchecks the narrative it builds anddecision.recordits fields joined as text, neither as stored JSON, so the blacklist paragraph names the paths that match the stored text and the two that do not. A tool field that is not a string is in the narrative as its JSON text, so the page calls only an observation's string tool fields plain text.context.packwith noqueryruns no search: astartuppack lists the addressed namespace's rows and another mode has nomemoriessection, so the deployment's default scope applies only to a pack with aquery.memory.proposal_decide(server/memory/app/proposals.py). The audit recipe's sentence therefore says which caller writes which row: an administrator's decision leaves amemory.proposal_acceptor amemory.proposal_rejectrow, the policy amemory.proposal_rejectrow.Scope and risk
Touches nine pages under
docs/andintegrations/claude-code-plugin/README.md: 196 lines added, 14 removed. No code, no test and no generated page changes.The branch holds a merge of
main, which conflicts in one row of the README's hook table,loom-session-memory.mjs. The row keepsmain's sentence on the test cost row that the SessionEnd hand-off carries, and this change's caps on the turns it sends. Every other row of that table ismain's.Left alone:
docs/reference/(generated) andi18n/(the translation workflow reads the English pages after the merge).What could break: a statement that is wrong. Each was checked against the code, and the first commit's statements that a request can show were also checked against a local server (Tests). No hook, op, stored row or permission changes.
Compatibility, rollout and rollback
Tests
No new test: the change is prose, and the existing docs tests cover links, anchors, public copy and the paths the agent instructions name.
What ran at this head, after the merge of
main, withpytest -n 2:tests/unit/test_doc_links.py tests/unit/test_public_copy.py tests/unit/test_agent_instructions.py tests/unit/test_agent_plugin.py tests/unit/test_plugin_agrees_with_server.py: 522 passed.test_package_contracts.py,test_op_transport_contract.py,test_tunable_constants.py,test_store_names_refused.py,test_degraded_unnoted.py) andtests/analyzer: 85 passed, 12 skipped.npx prettier@3.9.9 --checkandruff format --check(which formats the Python blocks in Markdown) on the ten files: pass. Againstmain, the README's two tables differ in the three edited rows only.python -m scripts.codegen.agent_plugin_sync --check,standalone_skills --checkandserved_skills --check: current.What ran at the head before the merge, and not again:
test_published_links.py,test_mcp_listing_budget.py,test_gemini_extension.py,test_i18n_context.py,test_docs_reference.py,test_settings_reference.py,test_environment_reference.py,test_help_docs.py,test_markdown_links.py,test_assistant_help_citations.py,test_stock_env_matches_docs.py,test_codex_plugin.py,test_cursor_plugin.py,test_i18n.py,test_page_summary.py,test_sdk_readme_facts.py,test_instructions_lint.py,test_error_help_link.py,test_benchmark_publication_copy.py): they passed, in a run of 955 tests with the two plugin tests above.make typecheck: pass.python scripts/codegen/docs_reference.py --checkandsettings_reference.py --check: current.The recipes and the statements a request can show were run once, at the branch's first commit, against a server started from this tree on a ClickHouse started for the task, with the fake embedder and the fake model provider, and removed afterwards. Their output is not committed, and the later commits change no recipe. What they showed:
2 of 3 proposals accepted. Both ops answer a writer's token as well as an administrator's.agentthe client's slug anduser_idandsession_id-. Undernewest_winsthe older row becamesuperseded; under the default policy both stayedactive. Two people on one client wrote one row.namespace.registeron an existing namespace withoutowner_emailanswered 422, and one that left outtagscleared them.namespace.guide_getnamed in its head line, and as 2,399 withsection_token_budgets{"namespace_guide": 600}, over HTTP and through theloom_context_packtool. Theinitializeinstructions andloom_activateheld no guide text.context.packread added a served row and no recall credit.memory.for_fileadded a served row only with a consumer named, and returned nothing for a tag the row lacks. Amemory.searchwith no consumer answerednot_credited; a consumer that had postedrun.completewas credited, and so wasloom_searchover MCP under a token minted with--consumer.recent_recallscounted thememory.searchcalls only.memory.set: the substringcafédid not refuse a value that holds it andcaf\u00e9did; the same for a quote, a line break and a backslash by their escapes;^"secretmatched where^secretdid not; a substring in another case did not match and(?i)did.Not run:
startuppack with noquerylists the addressed namespace alone whatever the default scope is read from_pack_memoriesand_pack_startup_recallinserver/memory/app/context_pack.py. Thatobserve.recordanddecision.recordmatch other text is read fromserver/memory/app/observe.pyanddecision.py; the narrative builder, called in process, keptcaféfrom a string tool field and wrote its escape for one inside an object or a list.make typecheck,ruff checkand the two reference generators' checks at this head: the merge and the commit after it change no Python file and no generated page, so the tree's Python ismain's.make lintto its end: it stops at the Rust SDK generator's check, which needsrustfmt, a tool this machine does not have. The steps before it pass (ruff check, the function-length and secret gates, the Python, TypeScript and Ruby SDK generators), and the three generator checks named above were run alone.make format-checkas a whole (it needsshfmt); the two formatters that read Markdown were run on the changed files.lib/session-memory.mjs,lib/run-hook.mjsandserver/memory/app/run_retention.py.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 wrote the text, read each statement in the code and ran the checks listed under Tests.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump), the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py) and the standalone skill bundles (python3 scripts/codegen/standalone_skills.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.Unticked: this change has no generated file, no migration, no shipped plugin file and no frontend file, so those four checks do not apply; the CLA line is the committer's to confirm. The first box is ticked with the gaps named under "Not run":
make lintandmake format-checkstop on tools this machine lacks, and the type check ran before the merge.🤖 Generated with Claude Code
Note
Low Risk
Prose-only changes with no wire, schema, or runtime behavior changes; risk is limited to possible documentation inaccuracies.
Overview
Documentation-only update across nine
docs/pages and the Claude Code plugin README so teams sharing one namespace can predict how search scope, packs, guides, counters, blacklist matching, extraction, run retention, and plugin hooks actually behave—statements were aligned with the server and plugin code.Search and multi-namespace reads:
identities-and-namespaces.mdreplaces a vague “same fan-out” claim with a table of defaultnamespace_scopeper reader (memory.search/memory.ask,loom_search,context.packwith vs withoutquery) and clarifies that scoped-token tiered search stops at the first namespace (including the addressed one) whose best match hitsLOOM_MEMORY_SEARCH_TIER_STOP_SIMILARITY.Team namespace guide: New “A namespace a team shares” section covers setup (
newest_wins, MCPagent/actorsemantics, kinds as tags), plusinsights.queryandaudit.listrecipes for weekly writers and proposal acceptance. Namespace guide delivery is spelled out (200-token/800-character budget,section_token_budgets, truncated text pointing atnamespace.guide_get); the MCP primer is documented as not containing the guide.Memory, refusal, and plugins: Blacklist patterns on writes match stored JSON (escapes, regex anchoring on
"); observe/decision paths use plain text. Coding-plugin file block requiresrepo:tags on session-namespace rows; recall_count /recent_recallsstay at 0 without a named consumer, with what still moves (served_count, health,evidence_count). Extraction notescoverage_sweepand per-callextraction_instructionsunder operator policy. Run retention and SessionEnd hand-off caps,LOOM_OBSERVE_SKIP_TOOLSreplacement semantics, andLOOM_CONFIG_FILEfor headless multi-bot tokens are documented in the plugin README and related guides.Reviewed by Cursor Bugbot for commit 9a9d921. Bugbot is set up for automated code reviews on this repo. Configure here.