Closed
Labels
Description
Overview
A collection's description says what the collection is for. Users and agents should be able to set it, and the agent should see it when deciding where to file a node. Today the field half exists: it's written to an undeclared, flat property, and nothing ever supplies a value. This issue declares it on the collection schema, stores it in the schema's bucket, makes it writable from the CLI and agent tools, and adds it to the agent's workspace context. A UI for setting it comes later and is out of scope.
Problem Statement
- Undeclared, and stored in the wrong place.
create_collection(packages/core/src/ops/collection_ops.rs) writesproperties.descriptionas a flat key, outside thecollectionbucket. Thecollectionschema inpackages/core/src/models/core_schemas.rsdoesn't declare it. - Never set. The only UI caller,
navigation-sidebar.svelte(collectionsData.createCollection(name)), passes no description. The CLI has no way to set it, and nothing can edit it after creation. - Read in one place. The collection viewer header (
collection-node-viewer.svelte) showscollection.properties.descriptionwhen present, reading the flat key. - The agent can't see it. The resident workspace context lists collection names only (
COLLECTIONS: a, b, cinWorkspaceContext::format_for_prompt,packages/core/src/ops/context_ops.rs), so the agent has nothing but a name to go on when filing a node. components/node-types.mdalready documentsdescriptionas a collection property ("Purpose description"). The code never declared it.
Proposed Solution
- Declare
description(string, optional) on thecollectionschema. It's stored atproperties.collection.description. - Fix the writer.
create_collectionwrites into the bucket, and the viewer header reads from the bucket. The create path in the store, Tauri command and proto keeps its optional description parameter. - CLI: no new command or flag.
nodespace node create --type collection … --property description="…"andnodespace node update <id> --property description="…"work once the field is declared. Verify thatnode create --type collectiongoes through the collection create path, which derives a deterministic id from the name (deterministic_collection_id). If it doesn't, route it there. - Agent tools:
create_node/update_nodeset the declared field through the shared pipeline. No new tool. - Workspace context: each listed collection shows its description after its name, truncated, within the existing
max_charsbudget. A collection without a description stays a bare name. - Skill guidance: the CLI references and generated
SKILL.mdteach setting a collection's description with--property description=…, and say why: it tells agents what the collection is for.
Architecture Impact
components/node-types.md(Collection) already listsdescription. This issue makes the code match. The doc'siconandcolorrows aren't stored or used anywhere and are left to the separate dead-code cleanup decision.- ADR-083 §5 / [Core release blocker] Strip all Pro code, edition branching and sync/ACL state from core in one pass (ADR-081 steps 0 and 2) #3412 remove
restrictedToMembersfrom the same schema. This is an independent field with no ordering dependency; if both are in flight, rebase whichever lands second. - ADR-064: the workspace context is the context-block channel. A description is data about the workspace, not instructions, which fits that channel.
- No ADR changes this decision. Companion docs change: none beyond keeping
node-types.mdaccurate (it already lists the field).
Acceptance Criteria
- The
collectionschema declaresdescription(string, optional);create_collectionstores it atproperties.collection.description, and nothing writes a flatproperties.descriptionon a collection (test) - The collection viewer header reads the description from the bucket
-
nodespace node create --type collection --content <name> --property description=<text>creates the collection through the deterministic-id path with the description, andnode update <id> --property description=<text>changes it (CLI tests) - The agent's
create_node/update_nodeset and change a collection description (test) - The workspace context renders
name — descriptionfor collections that have one, truncated, withinmax_chars; a test covers with, without, and truncated - Skill guidance (CLI references, generated
SKILL.md) teaches setting a collection description; theSKILL.mddrift check passes - Prompt golden regenerated (
UPDATE_GOLDEN=1) and the diff reviewed (theeval:decisionsbefore/after run was dropped: its fixture has no collection scenario, see the comment below) -
bun run test:changedpasses;bun run quality:fixclean
Technical Specifications
Reference Files
- Schema:
packages/core/src/models/core_schemas.rs(collection) - Create op:
packages/core/src/ops/collection_ops.rs(create_collection,deterministic_collection_id) - Collection service:
packages/core/src/services/collection_service.rs - Workspace context:
packages/core/src/ops/context_ops.rs(WorkspaceContext,format_for_prompt, collection names fetch) - Viewer:
packages/desktop-app/src/lib/components/viewers/collection-node-viewer.svelte - Frontend create path:
packages/desktop-app/src/lib/stores/collections.svelte.ts,packages/desktop-app/src/lib/services/collection-service.ts - CLI:
packages/cli/src/commands/node.rs(--property); skill references underpackages/skill/;packages/cli/examples/gen_skill_md.rs
Implementation Notes
- No migration: the database is reset (CLAUDE.md).
- Model-facing text changes fail
prompt_assembly_snapshot; regenerate withUPDATE_GOLDEN=1. - Check the eval fixture's age before an eval run.
Non-Goals
- Any UI for entering or editing a collection description (later work)
- Collection
icon/color
Activity
malibio commentedon Oct 1, 2026
Baseline — Frontend: 298 test files passed, 5510 tests passed
Declare collection description and show it in the agent's workspace c…
Declare collection description and show it in the agent's workspace c…
malibio commentedon Oct 1, 2026
The eval:decisions before/after criterion was dropped, with the issue owner's agreement. The decisions fixture has no collection scenario and its database holds no collections, so the collections section this change touches never appears in the prompt the eval exercises; a before/after run would differ only by model noise. For collections without a description the context is byte-identical to before, which the test format_for_prompt_collections_only pins. One rep was run against the build of main before stopping (9 of 11 scored scenarios passed); it measures main, not this change. A filing scenario where the collection descriptions decide the right answer does not exist in the fixture yet and would be the way to measure this.
Declare collection description and show it in the agent's workspace c…