feat(targets): add IBM Bob support - #2909
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new CHANGELOG entry is wrapped across multiple lines, but the repo’s changelog rules require one concise line per PR entry.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds IBM Bob as a first-class APM target, wiring it into the target catalog/detection pipeline and implementing Bob-native deployment for Agent Skills, lifecycle hooks, MCP configuration, and AGENTS.md compilation. The PR also updates docs and expands unit coverage to characterize the new target across registry, scope, and adapter behavior.
Changes:
- Add the
bobtarget capability/profile (inall, auto-detect via.bob/, compile familyagents) and plumb it through target detection, catalogs, and uninstall/cleanup paths. - Implement IBM Bob MCP configuration support via a new
BobClientAdapter, including config merge semantics and private-file permissions. - Update documentation (targets matrix, CLI reference, schema docs, integrations) and add/extend unit tests for Bob target behavior.
File summaries
| File | Description |
|---|---|
| tests/unit/integration/test_targets_registry_completeness.py | Adds BobClientAdapter to adapter registry completeness coverage. |
| tests/unit/integration/test_bob_target.py | New acceptance-style unit tests for Bob target detection, skills, hooks merge/cleanup, and dropped-target reconciliation. |
| tests/unit/core/test_target_catalog.py | Characterizes bob in known target sets and native profile snapshot expectations. |
| tests/unit/core/test_target_catalog_owner_invariant.py | Adds bob to the catalog owner invariant test set. |
| tests/unit/core/test_scope.py | Ensures bob is present in known targets for scope-related tests. |
| tests/unit/adapters/test_bob_client_adapter.py | New unit tests for Bob MCP adapter paths, merge behavior, transports, and stale cleanup. |
| src/apm_cli/policy/policy_checks.py | Includes .bob in script policy checks’ known directories. |
| src/apm_cli/models/dependency/host_virtual.py | Includes .bob in virtual host directory allow-list/set. |
| src/apm_cli/integration/targets.py | Adds Bob TargetProfile; introduces is_user_scope to support scope-aware hook config paths. |
| src/apm_cli/integration/mcp_integrator.py | Extends MCP stale-removal to also clean Bob’s .bob/mcp.json. |
| src/apm_cli/integration/mcp_integrator_install.py | Adds Bob runtime discovery signals for project/user scope. |
| src/apm_cli/integration/hook_integrator.py | Adds Bob hook event mapping, scope-specific config filename support, and unsupported-event skipping. |
| src/apm_cli/integration/hook_file_routing.py | Registers Bob for hook-file routing. |
| src/apm_cli/integration/_hook_dropped_targets.py | Uses scope-aware hook config filename/sidecar location for dropped-target reconciliation. |
| src/apm_cli/install/manifest_reconcile.py | Updates hook merge projection specs to support nested (scope-specific) config filenames. |
| src/apm_cli/factory.py | Registers BobClientAdapter in the client factory MCP registry. |
| src/apm_cli/core/target_detection.py | Adds Bob to auto-detection, agents alias sets, compile decision, and target descriptions. |
| src/apm_cli/core/target_catalog.py | Adds Bob capability to the canonical target catalog (in all). |
| src/apm_cli/core/errors.py | Updates empty-targets teaching message to include .bob/. |
| src/apm_cli/core/deployment_ledger.py | Maps .bob/ to the bob target for deployment ledger normalization. |
| src/apm_cli/compilation/context_optimizer.py | Includes .bob in context optimizer’s known harness directories. |
| src/apm_cli/commands/uninstall/engine.py | Updates native-hook state detection to use scope-aware hook config filename/sidecar path. |
| src/apm_cli/adapters/client/bob.py | New IBM Bob MCP client adapter implementation. |
| README.md | Lists IBM Bob among supported harnesses in the README intro section. |
| docs/src/content/docs/reference/targets-matrix.md | Adds Bob to the targets matrix and documents Bob-specific conventions. |
| docs/src/content/docs/reference/manifest-schema.md | Adds bob to documented manifest target values and target restriction docs. |
| docs/src/content/docs/reference/cli/uninstall.md | Notes .bob/settings.json hook merge cleanup in uninstall behavior. |
| docs/src/content/docs/reference/cli/targets.md | Adds Bob to apm targets sample output and detection table. |
| docs/src/content/docs/reference/cli/install.md | Adds Bob to --target docs and documents Bob MCP env-var handling + permissions. |
| docs/src/content/docs/reference/cli/init.md | Adds Bob to apm init --target docs. |
| docs/src/content/docs/reference/cli/deps.md | Adds Bob to apm deps update --target docs. |
| docs/src/content/docs/reference/cli/compile.md | Adds Bob to compile recommendations and output table. |
| docs/src/content/docs/integrations/ide-tool-integration.md | Documents Bob MCP config paths and compile usage in the integrations guide. |
| docs/src/content/docs/consumer/install-mcp-servers.md | Adds Bob to the MCP config path matrix and global-write behavior description. |
| docs/src/content/docs/concepts/primitives-and-targets.md | Adds Bob to the targets list and compatibility matrix. |
| CHANGELOG.md | Adds an Unreleased entry announcing stable IBM Bob target support. |
Review details
- Files reviewed: 36/36 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Addressed the changelog formatting recommendation in |
|
Ching Wei Kang (@WilliamK112) Sorry for jumping into this PR but I might have some info on bob that could be useful your PR. Regarding MCPs support:
If it's possible agent support would also be a great addition. They live in
Would be happy to test the changes locally after they are implemented and provide feedback regarding any issues. |
|
Thanks for jumping in—hands-on Bob testing would be very useful. I rechecked the current IBM documentation before changing the adapter. The MCP page explicitly says that Edit Global MCP opens The current adapter intentionally resolves environment references at install time because the MCP documentation does not define general runtime interpolation. Your observation that Agent personas also look worthwhile. The current docs confirm project/user |
Description
Adds IBM Bob as a stable native APM target, closing the Skills/Hooks/MCP gap described in #2736.
The implementation follows IBM Bob's documented contracts:
.bob/skills/<name>/SKILL.mdand~/.bob/skills/<name>/SKILL.md.bob/settings.jsonand~/.bob/settings/settings.json, preserving user-authored settings and hooks.bob/mcp.jsonand~/.bob/mcp.jsonundermcpServers, with Bob-native STDIO, Streamable HTTP, and legacy SSE shapesAGENTS.md, which Bob loads automaticallybobis available through--target bob, participates in--target all, auto-detects from.bob/, supports project/user scope, and is wired through cleanup, dropped-target reconciliation, ownership, governance, CLI help, and the target documentation.Bob's MCP docs do not promise runtime environment-variable interpolation, so the adapter uses APM's install-time resolution path and keeps the generated config private (
0600). Unsupported Bob hook events are skipped with a warning rather than writing a schema Bob cannot consume.Official references:
Fixes #2736
Type of change
Testing
ruff checkandruff format --checkacrosssrc/,tests/, and architecture scriptsSpec conformance (OpenAPM v0.1)