Skip to content

feat(cli): add Oh My Pi (omp) as 44th client surface#1229

Open
DavidHLP wants to merge 4 commits into
DeusData:mainfrom
DavidHLP:feat/649-omp-client-surface
Open

feat(cli): add Oh My Pi (omp) as 44th client surface#1229
DavidHLP wants to merge 4 commits into
DeusData:mainfrom
DavidHLP:feat/649-omp-client-surface

Conversation

@DavidHLP

Copy link
Copy Markdown

Summary

  • Add Oh My Pi (omp) as a STABLE, auto-detected client surface with full four-layer integration: MCP server registration, durable instructions, skill installation, and three direct-MCP tiered subagent profiles (Scout/Verify/Auditor)
  • Register OMP's MCP configuration at ~/.omp/agent/mcp.json using the standard mcpServers JSON path with type: "stdio"
  • Add OMP-specific profile rendering with mcp__codebase_memory_mcp_ tool names, exact-source reads (read-summarize: false), and automatic loading of the codebase-memory skill
  • Update the supported-surface count from 43 to 44 across the main README, npm README, website, llms.txt, and CLI help

Refs #649.

ℹ️ Scope note for maintainers: This PR covers the OMP client-integration side of #649. The resources/list protocol compatibility issue described there was addressed separately in #958.


Install / Uninstall

OMP is detected automatically when its command or ~/.omp/agent marker is present.

# Install all detected client integrations, including OMP
codebase-memory-mcp install

# Preview without writing files
codebase-memory-mcp install --dry-run

# Remove managed client integrations
codebase-memory-mcp uninstall

# Preview uninstall
codebase-memory-mcp uninstall --dry-run

The OMP integration manages:

~/.omp/agent/mcp.json
~/.omp/agent/AGENTS.md
~/.omp/agent/skills/codebase-memory/
~/.omp/agent/agents/codebase-memory-scout.md
~/.omp/agent/agents/codebase-memory.md
~/.omp/agent/agents/codebase-memory-auditor.md

Test plan

  • make -f Makefile.cbm test — 6224 passed, 1 skipped
  • make -f Makefile.cbm lint-ci — CI linters passed (cppcheck, clang-format, NOLINT whitelist)
  • make -f Makefile.cbm security — all security checks passed (75 files)
  • git diff --check — no whitespace errors
  • New OMP client, profile, registry, schema, and documentation contracts are covered by tests

Changes (13 files)

File Change
src/cli/agent_clients.h Add CBM_AGENT_CLIENT_OMP
src/cli/agent_clients.c Add the stable client profile, detection marker, MCP path, JSON editing, and type: "stdio" schema
src/cli/agent_profiles.h Add CBM_GRAPH_DIALECT_OMP
src/cli/agent_profiles.c Add direct-MCP OMP profile rendering and tool-prefix rules
src/cli/cli.c Add managed OMP install/uninstall paths, legacy migration content, and registry routing
src/main.c Update the supported-client count and CLI help
tests/test_agent_clients.c Cover OMP stability, capabilities, paths, JSON schema, and foreign-entry behavior
tests/test_agent_profiles.c Cover direct-MCP profiles, tool names, read-summarize, skill autoloading, and handoff behavior
tests/test_cli.c Update registry and documentation consistency contracts
README.md Add OMP to the support matrix and update counts
pkg/npm/README.md Add OMP and update counts
docs/index.html Add OMP and update counts
docs/llms.txt Add OMP and update counts

Design notes

  • OMP is direct-MCP capable: runtime ablation testing confirmed its subagents can call mcp__* tools directly
  • No HOOK capability is added because OMP's tool_call context event is advisory and does not provide a safe augmentation channel
  • read-summarize: false keeps Tier 2/3 evidence grounded in exact source rather than structural summaries
  • autoloadSkills: [codebase-memory] is required because OMP subagents start without parent conversation history
  • The integration preserves foreign MCP entries and only removes content managed by codebase-memory-mcp

Checklist

  • Every commit is signed off (git commit -s) — DCO present on f80b3c2
  • Tests pass locally (make -f Makefile.cbm test)
  • Lint passes (make -f Makefile.cbm lint-ci)
  • New behavior is covered by tests

Add omp (Oh My Pi) as a STABLE, detected client surface with full
four-layer integration: MCP server registration, durable instructions,
skill, and three direct-MCP tiered subagent profiles (Scout/Verify/
Auditor). This matches Claude Code's integration depth — omp subagents
have direct MCP access (confirmed via ablation testing), unlike
parent-handoff-only clients (Pochi, Cursor, Rovo, Augment).

Schema (agent_clients.h):
  New CBM_AGENT_CLIENT_OMP enum value, positioned before COUNT.

Profile (agent_clients.c):
  - stability: CBM_AGENT_STABLE (auto-detected, auto-installed)
  - capabilities: MCP | INSTRUCTIONS | SKILL | AGENT
    No HOOK — omp's context event is fire-once advisory only; the
    recommended upstream path is skill + agents + MCP, not TS hooks.
  - detection_command: "omp" (specific enough per existing clients)
  - marker: ~/.omp/agent (omp-managed config root)
  - resolve_path: ~/.omp/agent/mcp.json
  - json_client: true (uses standard mcpServers JSON edit path)
  - agent_json_canonical: added to type:"stdio" branch alongside
    GitLab Duo and Visual Studio (omp's schema expects this field)

Dialect (agent_profiles.h/.c):
  New CBM_GRAPH_DIALECT_OMP, direct-capable (not in handoff-only list).
  - tool prefix: "mcp__codebase_memory_mcp_" (single underscore,
    hyphens→underscores — verified at runtime via omp device inventory)
  - render: YAML frontmatter with tools (read/grep/glob + tier-specific
    MCP tool allowlist), read-summarize: false (exact source verification
    for evidence tiers — omp's read returns structural summaries by
    default), autoloadSkills: [codebase-memory] (subagents start blank)

Install/uninstall (cli.c):
  - install_omp_durable_context: writes AGENTS.md + skill +
    3 tiered agent profiles to ~/.omp/agent/
  - uninstall_omp_durable_context: removes managed block + skill +
    tiered profiles
  - legacy_omp_verify_agent_content: migration source for prior installs
  - Wired into install_agent_client_registry and
    uninstall_agent_client_registry loops

Design decisions (documented for reviewers):
  1. No HOOK capability: omp's tool_call event can only block/pass (no
     augmentation channel like Claude's additionalContext). A context-
     event nudge was tested but is advisory-only and excluded from the
     upstream path to keep the PR minimal.
  2. read-summarize: false: omp's read tool returns structural summaries
     by default; Tier 2/3 require exact snippets for material claims.
  3. autoloadSkills: omp subagents start with no conversation history;
     without autoload the skill decision matrix is never loaded.
  4. Direct-capable (not handoff): ablation testing confirmed omp
     subagents can call mcp__* tools directly. write→xd:// dispatch
     does NOT work in subagents ("xd:// is not mounted in this session").

Test coverage:
  - test_agent_clients.c: omp in stable_ids (19 entries), capabilities
    array, json_schemas (type:stdio assertion), foreign_entries
  - test_agent_profiles.c: omp in direct_dialects array, direct-capable
    assertion, dedicated test verifying direct profile has
    mcp__codebase_memory_mcp_ prefix + read-summarize + autoloadSkills,
    and handoff profile excludes MCP tools
  - test_cli.c: required_agents updated to 44, all 43→44 / 37→38 string
    contracts updated across README/npm/index.html/llms.txt/main.c

Build: scripts/build.sh passes (exit 0).
Tests: scripts/test.sh passes (exit 0, all suites green).
Lint: scripts/lint.sh has one pre-existing error in pass_lsp_cross.h
(parameter name mismatch imp_keys/imp_vals vs imp_names/imp_qns),
unrelated to this change.

Signed-off-by: DavidHLP <lysf15520112973@163.com>
@DavidHLP
DavidHLP requested a review from DeusData as a code owner July 23, 2026 11:55
@DeusData DeusData added the enhancement New feature or request label Jul 24, 2026
@DeusData DeusData added this to the 0.9.2-rc milestone Jul 24, 2026
@DeusData DeusData added editor/integration Editor compatibility and CLI integration ux/behavior Display bugs, docs, adoption UX priority/normal Standard review queue; useful PR with ordinary maintainer urgency. labels Jul 24, 2026
@DeusData

Copy link
Copy Markdown
Owner

Thanks for the comprehensive integration work. Before product-direction approval, the current head has two concrete configuration risks: it hardcodes ~/.omp/agent, ignoring named profiles and PI_CODING_AGENT_DIR, and it writes a global AGENTS.md whose OMP precedence can shadow existing user safety/custom instructions. The tests cover rendered strings and registry entries but not named/relocated profiles, install-plan/dry-run/uninstall, or instruction precedence. Please pause implementation while we decide whether OMP should be auto-installed at all; if accepted, profile resolution and a non-shadowing instruction policy are required.

@DavidHLP

Copy link
Copy Markdown
Author

Thanks — understood. I’ll pause implementation until the product direction on OMP auto-installation is decided.

If the integration is accepted, I’ll revise it to:

  • resolve the effective OMP agent directory instead of assuming ~/.omp/agent, including named profiles and PI_CODING_AGENT_DIR;
  • use an instruction-installation policy that cannot shadow or replace existing user safety/custom instructions; and
  • add behavioral coverage for relocated/named profiles, install planning, dry-run, uninstall, preservation of user-managed content, and instruction precedence.

I won’t push further implementation changes until that direction is confirmed. Thanks for calling out these risks.

@DeusData

Copy link
Copy Markdown
Owner

Thanks, and sorry for the slow first response. Queued for review.

Mechanically clean: MERGEABLE with 28 green checks across +139/-29 in 13 files.

Being straight with you about the review question: adding a 44th client surface is a scope decision rather than a correctness one. The implementation being clean does not by itself settle whether the project wants another integration target to maintain, and that call is the maintainers rather than mine to make in triage. Mentioning it now rather than after a long silence.

Signed-off-by: DavidHLP <lysf15520112973@163.com>
@DavidHLP

Copy link
Copy Markdown
Author

@DeusData
Thanks for the update and for explaining the situation. I understand that this is a decision for the maintainers, and I’m happy to wait for their review. Thanks again for taking the time to look at the PR.

Signed-off-by: DavidHLP <lysf15520112973@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editor/integration Editor compatibility and CLI integration enhancement New feature or request priority/normal Standard review queue; useful PR with ordinary maintainer urgency. ux/behavior Display bugs, docs, adoption UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants