feat: bm_projects and bm_workspaces as agent tools#5
Conversation
Promote the discovery logic previously available only as /bm-project and /bm-workspace slash commands to agent-facing tools. Adds two entries to _HERMES_TO_BM (→ list_memory_projects, list_workspaces) and corresponding TOOL_SCHEMAS entries. These are global discovery tools — they list across all projects and workspaces, so they don't take routing args. A new _GLOBAL_TOOLS frozenset gates the per-tool routing logic in both directions: the post-construction loop on TOOL_SCHEMAS skips them when adding the routing properties, and _translate_args skips the routing block for them. Both tools request output_format=json since the agent needs to parse identifiers (UUIDs, workspace slugs) out of the response. system_prompt_block now lists the two new tools so the agent reaches for them when the user names a project that isn't the configured one. Together with the project_id routing landed in #4, these unblock the flow Drew's friction note flagged: the agent can now bm_projects() → pick by name+workspace → bm_write(... project_id=<uuid>) instead of silently operating against the active Hermes memory project. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This PR ships alongside the project_id routing changes in the same 0.3.0 release rather than its own minor bump. Merge the two entries into a single 0.3.0 section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After evaluating bm_import: no new capability over read_file + bm_write (now that #4 added project_id routing). Adding it would burn a tool slot for what's already a clean two-call composition. Documenting the read → write pattern in SKILL.md is the better fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Quick design update: dropped the planned The original friction note proposed a tool with shape Costs of adding it anyway: extra tool slot (context budget on every turn), an asymmetric "do-multiple-things" tool in an otherwise compositional surface, no native BM CLI equivalent to fall back to, and built-in policy decisions (title inference, frontmatter handling) the agent currently makes explicitly. The remaining follow-up — a SKILL.md update documenting the discovery → route → write → verify pattern with a worked example matching the friction note's scenario — should close out this thread of work. If we later see the agent reliably getting the read-then-write pattern wrong even with skill docs in place, we can revisit. |
|
Folded the SKILL.md update (task #13) into this PR — the skill documents the new tools, so they ship together. Adds entries for |
Summary
Adds two new agent-facing tools that wrap BM's `list_memory_projects` and `list_workspaces`. The discovery logic was previously available only as `/bm-project` / `/bm-workspace` slash commands — useful for humans, invisible to the agent. Together with the `project_id` routing landed in #4, these unblock the workflow Drew's friction note flagged:
`bm_projects()` → pick by name + workspace → `bm_write(... project_id=)`
instead of silently operating against the active Hermes memory project.
`bm_projects` returns JSON with name + `external_id` (UUID) per project — the UUID is exactly what `project_id` on the read/write tools expects. `bm_workspaces` returns workspaces with name, type, role, and default flag.
Design notes
Test plan
🤖 Generated with Claude Code