Skip to content

feat(omp): add native oh-my-pi harness support - #1323

Open
caelaxie wants to merge 4 commits into
EveryInc:mainfrom
caelaxie:caelaxie/omp-support
Open

feat(omp): add native oh-my-pi harness support#1323
caelaxie wants to merge 4 commits into
EveryInc:mainfrom
caelaxie:caelaxie/omp-support

Conversation

@caelaxie

@caelaxiecaelaxie commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Implements the boundary proposed in #1224: native oh-my-pi (omp) support with no converter, no writer, no new manifest, no .omp-plugin/ metadata, and no separate release component. omp already installs this repository natively via the existing package.json#pi package metadata and the Claude marketplace catalog (verified empirically against omp 17.2.7, re-checked from the issue's 17.0.5 pin); the gap was CE's own harness-specific instructions, and this PR closes it.

Closes#1224.

What changed

CLI — detection, not conversion

  • src/utils/detect-tools.ts: new detection-only omp entry (~/.omp, project .omp/), same class as copilot/droid/qwen. --to all now prints - omp — native plugin install; skipped instead of silently ignoring the host.
  • install/convert "no installable tools" guidance now names oh-my-pi (omp).
  • Explicit --to omp rejects as an unknown target, exactly like the other native-install-only hosts.

Docs

  • New docs/specs/omp.md target spec (kimi.md shape), verified 2026-08-05 against omp 17.2.7: plugin loading via package.json#pi + .claude-plugin/marketplace.json fallback, install commands (omp install, omp plugin link, marketplace flow), runtime contracts CE skills rely on (/skill:<name>, built-in ask/task/todo, native MCP, skill:// URLs), and session-storage layout including the profile and env-override chain.
  • README.md: omp added to the supported-host enumeration, a new ### oh-my-pi (omp) subsection under More Install Options, a contributor local-dev block (omp plugin link "$PWD"), and the Limitations native-loading sentence.

Skill prose — the compatibility pass

  • Blocking-question tool lists across ~40 files now include omp's built-in ask (adjacent to the Pi ask_user item; the negative pin in ce-code-review includes it too).
  • Closed subagent-primitive enumerations (ce-work execution-engines matrix, ce-plan, ce-simplify-code) now name omp's built-in task. Open "or the equivalent" phrasings were deliberately left alone — they already cover omp.
  • User-facing invocation rendering: omp's form is /skill:<name> (not /skill-name, not $skill-name). The centralized rule in AGENTS.md, the authoring guide, README's invocation note, and all 13 per-skill rendering-rule copies carry the new clause; the parity tests were generalized from a two-form to a three-form contract.

Session history (ce-compound)

  • discover-sessions.sh: new discover_omp() + --platform omp arm. Scans ${PI_CODING_AGENT_DIR:-$HOME/${PI_CONFIG_DIR:-.omp}/agent}/sessions and named-profile roots ~/.omp/profiles/*/agent/sessions, and honors a flat PI_CODING_AGENT_SESSION_DIR override. Exact repo attribution comes from the downstream header cwd filter (hashed buckets embed only basename + sha256, so no bucket-name probe is reimplemented).
  • extract-metadata.py: try_omp runs before try_pi — omp session files physically begin with a 256-byte {"type":"title",...} slot line before the pi-shaped type:"session" header, which distinguishes them from pi files. Platform identity is omp.
  • extract-skeleton.py / extract-errors.py: omp files reuse pi extraction (title-slot line skipped; title_change entries are unaffected).
  • Prose: ce-compound SKILL.md session-root list, session-historian.md, and docs/skills/ce-compound.md platform enumerations updated.

Tests

  • tests/cli.test.ts: --to all prints the omp native-skip line; --to omp rejects like other native-only targets.
  • tests/detect-tools.test.ts: tool count 7 → 8; omp detection asserted.
  • tests/session-history-scripts.test.ts + new tests/fixtures/session-history/omp-session.jsonl: omp auto-detection (not pi), discovery across default profile / named profile / both env overrides, --platform omp restriction, skeleton + errors extraction.
  • tests/omp-native-install.test.ts (new): guarded on the omp binary — dry-run install recognizes this repo (omp install --dry-run --json) and every skills/<name>/SKILL.md carries the name + description frontmatter omp requires for discovery. Skips cleanly when omp is absent.

Verification

  • bun run test (full suite, same as CI): 2885 pass, 0 fail on the committed tree. Note: tests/skills/ce-code-review-cross-model-routes.test.ts fails if run against a dirty tree because the script under test diffs HEAD against the worktree and this PR's own uncommitted diff trips its large-diff path — it passes once committed.
  • bun run release:validate: in sync (0 agents, 32 skills, 0 MCP servers — counts unchanged).
  • bun run plugin:validate: not runnable locally (claude CLI not installed on this machine); no plugin manifests were touched.
  • End-to-end smoke: discover-sessions.sh omp-support 7 --platform omp against a real ~/.omp/agent/sessions/ root finds this repo's live session; extract-metadata.py reports platform: "omp" with the correct cwd and 0 parse errors.
  • omp install --dry-run --json . on omp 17.2.7: recognizes the repo (name, version, extensions, skills) — covered by the new smoke test.

Deliberately not done (per the issue's boundary)

  • No --to omp converter or pi-writer reuse; no .omp-plugin/ metadata; no release component.
  • XDG-relocated omp roots ($XDG_DATA_HOME/omp) are not scanned by session discovery — documented as a known gap in docs/specs/omp.md.
  • Representative skill evals (behavioral) were not run here; happy to add skill-creator eval evidence if maintainers want it before merge.

Security Disclosure

One shell change in a skill: skills/ce-compound/scripts/session-history/discover-sessions.sh gains discover_omp(), which reads omp session JSONL from $HOME/${PI_CONFIG_DIR:-.omp}-rooted paths (plus the existing PI_CODING_AGENT_SESSION_DIR / PI_CODING_AGENT_DIR overrides, same trust model as the pre-existing discover_pi()). All globs are guarded and no user-controlled input is interpolated beyond the established REPO_NAME/--cwd parameters. The Python extractors gain read-only omp branches (title-slot skip, try_omp detection). No new network access, credential handling, permissions, or dependencies. Residual risk: none identified beyond the existing pi path's.

Agent Disclosure

  • Model:Oh My Pi (omp) · kimi-code/k3

Research, decomposition, delegation, review, and verification by the agent; the five implementation slices were executed by delegated subagents under the same harness, and their diffs were reviewed before commit.

- detect omp (~/.omp, project .omp/) so `--to all` reports it as a
native plugin install instead of attempting conversion; no --to omp
converter, writer, or manifest (per CONCEPTS.md native-plugin-surface)
- docs/specs/omp.md target spec verified against omp 17.2.7; README
gains omp install/local-dev/limitations coverage
- skills: omp built-in `ask` in blocking-question lists, `task` in
closed subagent enumerations, and `/skill:<name>` user-facing
invocation form across the rendering-rule copies, AGENTS.md, and the
authoring guide
- ce-compound session history: discover omp sessions under
~/.omp/agent/sessions and named-profile roots (honoring
PI_CODING_AGENT_SESSION_DIR/PI_CODING_AGENT_DIR/PI_CONFIG_DIR), detect
omp JSONL via its physical title-slot line before the pi-shaped
header, and reuse pi extraction for omp platform identity
- tests: detection, --to all note, session fixture + discovery/extract
coverage, invocation-rendering parity, and a guarded
omp-native-install smoke test
ClosesEveryInc#1224

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:8bf0cb1a91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadskills/ce-compound/scripts/session-history/discover-sessions.sh Outdated
Comment threadskills/ce-compound/SKILL.md Outdated
- deduplicate all-platform discovery output: Pi and omp share the
PI_CODING_AGENT_SESSION_DIR flat override, so both discoverers emitted
the same files (Codex review P2)
- glob omp's sanitized bucket basename ([^a-zA-Z0-9._-]+ -> "-", edge
dashes stripped, capped at the last 80 chars, empty -> "project",
mirroring session-paths.ts getDefaultSessionDirName) so repos whose
basename omp normalizes (e.g. spaces) are still discovered
- SKILL.md: include omp sessions in the mandatory keyword rerun clause —
omp session headers carry cwd but no git branch, same as Codex/Pi

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cd24249c82

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadskills/ce-compound/references/agents/session-historian.md
…pport
# Conflicts:
#	skills/ce-doc-review/references/walkthrough.md
Address PR EveryInc#1323 review feedback by updating the historian prompt's platform enum, cwd metadata, cross-tool synthesis guidance, and provenance header. Add a contract regression guard.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:a7794e6b21

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

local root
for root in "$agent_dir/sessions" "$HOME/$config_dir"/profiles/*/agent/sessions; do
[ -d "$root" ] || continue
for dir in "$root"/*"$sanitized"*/; do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Search raw legacy omp buckets as well

Fresh evidence from the newly added docs/specs/omp.md is that legacy unmigrated omp buckets can still appear as raw -<home-relative> / --<abs>-- paths. This glob only uses the sanitized basename, so a repo whose basename contains characters omp now normalizes, such as my repo, will miss an existing legacy bucket like --Users-test-Code-my repo-- even when --cwd is supplied; the downstream exact-CWD filter cannot recover a session file that discovery never emits. Add a raw/legacy CWD probe alongside the sanitized hashed-bucket glob.

Useful? React with 👍 / 👎.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: add native oh-my-pi (omp) support

1 participant

@caelaxie