Skip to content

Commit 1555935

Browse files
groksrcclaude
andcommitted
docs+test: replace placeholder IDs with valid UUID4 format
The previous examples used '01HXYZ...' and 'uuid-1' as project_id placeholders. The actual external_id values BM emits are str(uuid.uuid4()) (see basic-memory/src/basic_memory/models/project.py:45), so the examples should look like UUIDs. Uses two distinct fake UUIDs across SKILL.md and tests so they don't look like shared state: - bf2a4c1e-d77f-4b7a-9c3e-5d8a1f0e2b6d (SKILL.md examples + one test) - e1d3a5b8-0492-4c1f-8e7d-2a4b6c8d0e2f (parametrized routing test) SKILL.md uses ellipsed forms (bf2a4c1e-d77f-...) where the literal is purely a placeholder, and the full UUID where the example is showing what bm_projects actually returns. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 49289bb commit 1555935

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

skill/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ bm_recent({ timeframe: "2 weeks", type: "entity" })
9090
`timeframe` accepts natural language (`"yesterday"`, `"2 weeks"`, `"last month"`) or compact forms (`"7d"`, `"24h"`). Default is `7d`.
9191

9292
### `bm_projects` — list available projects
93-
Returns name, workspace slug, and `external_id` (UUID) per project across local and cloud. Call this when the user names a project that isn't the active one. Route follow-up tool calls either by workspace-qualified name (`project: "personal/main"`) or by UUID (`project_id: "01HXYZ..."`) — see Cross-project routing below.
93+
Returns name, workspace slug, and `external_id` (UUID) per project across local and cloud. Call this when the user names a project that isn't the active one. Route follow-up tool calls either by workspace-qualified name (`project: "personal/main"`) or by UUID (`project_id: "bf2a4c1e-d77f-..."`) — see Cross-project routing below.
9494

9595
```
9696
bm_projects()
@@ -134,7 +134,7 @@ bm_write({ title: "...", folder: "...", content: "...", project: "main" })
134134
bm_write({ title: "...", folder: "...", content: "...", project: "personal/main" })
135135
136136
# UUID (most stable, survives renames)
137-
bm_write({ title: "...", folder: "...", content: "...", project_id: "01HXYZ..." })
137+
bm_write({ title: "...", folder: "...", content: "...", project_id: "bf2a4c1e-d77f-..." })
138138
```
139139

140140
`bm_projects` and `bm_workspaces` themselves do **not** take routing — they list across everything.
@@ -147,7 +147,7 @@ When the user asks something like *"save this markdown file to my personal `main
147147

148148
```
149149
bm_projects()
150-
# → [{name: "main", external_id: "01HXYZ...", workspace: "Personal", ...}, ...]
150+
# → [{name: "main", external_id: "bf2a4c1e-d77f-4b7a-9c3e-5d8a1f0e2b6d", workspace: "Personal", ...}, ...]
151151
```
152152

153153
If a project name appears in multiple workspaces, use `bm_workspaces()` to confirm which slug you want.

tests/test_helpers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def test_translate_uses_project_id_override(bm):
314314
"""Agent passes project_id=<uuid> → reaches BM as project_id, with no
315315
project name in the call (would be redundant and risk server-side
316316
precedence surprises)."""
317-
uuid = "01HXYZ123ABC456DEF789GHI"
317+
uuid = "bf2a4c1e-d77f-4b7a-9c3e-5d8a1f0e2b6d"
318318
_, args = bm._translate_args(
319319
"bm_search", {"query": "hi", "project_id": uuid}, "default-proj"
320320
)
@@ -325,7 +325,7 @@ def test_translate_uses_project_id_override(bm):
325325
def test_translate_project_id_wins_when_both_supplied(bm):
326326
"""If the agent passes both, project_id is the more specific identifier
327327
(UUID across workspaces) and takes precedence. Only project_id reaches BM."""
328-
uuid = "01HXYZ123ABC456DEF789GHI"
328+
uuid = "bf2a4c1e-d77f-4b7a-9c3e-5d8a1f0e2b6d"
329329
_, args = bm._translate_args(
330330
"bm_search",
331331
{"query": "hi", "project": "main", "project_id": uuid},
@@ -361,9 +361,9 @@ def test_translate_routing_works_for_every_tool(bm, tool, base_args):
361361
_, out = bm._translate_args(tool, args_with, "default-proj")
362362
assert out["project"] == "main"
363363

364-
args_with_id = dict(base_args, project_id="uuid-1")
364+
args_with_id = dict(base_args, project_id="e1d3a5b8-0492-4c1f-8e7d-2a4b6c8d0e2f")
365365
_, out = bm._translate_args(tool, args_with_id, "default-proj")
366-
assert out["project_id"] == "uuid-1"
366+
assert out["project_id"] == "e1d3a5b8-0492-4c1f-8e7d-2a4b6c8d0e2f"
367367
assert "project" not in out
368368

369369
_, out = bm._translate_args(tool, base_args, "default-proj")
@@ -398,7 +398,7 @@ def test_translate_global_tools_ignore_project_kwargs(bm):
398398
the listing would be worse than ignoring the args."""
399399
_, out = bm._translate_args(
400400
"bm_projects",
401-
{"project": "main", "project_id": "uuid-1"},
401+
{"project": "main", "project_id": "e1d3a5b8-0492-4c1f-8e7d-2a4b6c8d0e2f"},
402402
"default-proj",
403403
)
404404
assert "project" not in out

0 commit comments

Comments
 (0)