Skip to content

Folders for skills and company memory, with role restrictions #1153

Closed

Description

@helpcodeai

Follow-up to #1148 and #1151. With dozens of skills and hundreds of company memory items, flat lists stop working: for people in the dashboard, and for AI clients, which get either a very long list or nothing. Companies also want some knowledge visible only to some teams (sales procedures vs. accounting rules).

Proposal

Folders, one tree per workspace shared by skills and the company memory: a folder like "Sales / Quotes" holds both the quote procedures (skills) and the facts about quotes (memory).

  • A folder has a name, an optional description and an optional parent, up to 4 levels. Names are unique among siblings.
  • Skills and organization memory items get an optional folder; without one they sit at the root. Personal memory has no folders (tags only).
  • Admins and editors create, rename, move and delete folders. Deleting a folder moves its subfolders and items to its parent; nothing is deleted.
  • Tags stay for cross-cutting topics.

MCP (/mcp/:serverId):

  • skills_list(query?, folder?) returns the subfolders and skills of a folder (by path or id), with the folder of each skill.
  • When skills are served as an index, the index is grouped by folder; when it does not fit, it lists the top-level folders with their description and counts and the model opens one with skills_list.
  • memory_search(query?, scope?, folder?) filters by folder (subfolders included) and returns each item's folder; memory_save accepts an existing folder for company memory. AI clients never create folders.

Folder restrictions (team scope, Enterprise): a folder can be limited to one or more roles (the custom roles under Settings > Roles, including those synced from the identity provider). Restrictions apply to the folder and everything below it, and to every path: instructions, skills_list / skill_get, prompts, memory_search, the knowledge-graph lookup and the dashboard. Workspace admins see everything. A restricted folder is invisible to everyone else, as if it did not exist. Setting restrictions needs an Enterprise licence; restrictions already set keep applying without it (they never widen on their own).

Storage

New table knowledge_folders (organization, parent, name, description, role ids, timestamps) and nullable folder_id columns on kg_skill_suggestions and memory_items (set to null when a folder is removed). No data is moved by the migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions