Skip to content

Commit 86dfbf9

Browse files
committed
brainkb skill: state slug/graph uniqueness, no-delete policy, list-by-permission
1 parent 040c40e commit 86dfbf9

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

skills/brainkb_skills/SKILL.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,24 @@ password unprompted:**
198198
shows up with an empty description). If the user didn't give one, ask for a short
199199
description, or derive a sensible one from the space/graph name and the data
200200
being ingested; don't silently register with an empty description.
201-
- List what the user can see: `brainkb_list_spaces()`.
201+
- **Uniqueness (enforced by the backend):** a space `slug` is **globally unique**
202+
and a named-graph IRI is **globally unique** (one graph belongs to exactly one
203+
space). Creating a space with a taken slug, or binding an already-registered
204+
graph, returns **409** — pick a different slug / IRI. Don't retry the same value.
205+
- **Deletion — what is and isn't removable:** spaces and named graphs are
206+
**permanent — there is NO delete** (preserves provenance/history, same "we don't
207+
hard-delete" policy as user accounts). What you *can* remove: a **space member**
208+
(`brainkb_remove_*`/members endpoint) and a **fine-grained access rule**
209+
(`brainkb_remove_access_rule`). To retire a space in practice, set it private
210+
and/or remove members — you cannot delete it. So choose slugs/graph IRIs
211+
deliberately: a typo can't be deleted, only abandoned.
212+
- **See what's available to the user + their permission:** `brainkb_list_spaces()`
213+
returns each visible space annotated with the caller's own permission —
214+
`your_role` (`owner`/`editor`/`viewer`/`null`), `is_owner`, `access`
215+
(`owner`/`member`/`public`), and `can_write` (their space role permits ingest;
216+
a real ingest also needs the `ingest` capability + any per-space access rules).
217+
Use it to tell the user which spaces they can **write** to vs. only **read** vs.
218+
only see as **public**, rather than guessing.
202219

203220
### 3. Ingest
204221
- **Before ingesting, verify identity: call `brainkb_whoami()` and confirm the

0 commit comments

Comments
 (0)