Skip to content

feat: add Oh My Pi (OMP) tool support#1276

Open
xianzheTM wants to merge 2 commits into
Fission-AI:mainfrom
xianzheTM:main
Open

feat: add Oh My Pi (OMP) tool support#1276
xianzheTM wants to merge 2 commits into
Fission-AI:mainfrom
xianzheTM:main

Conversation

@xianzheTM

@xianzheTM xianzheTM commented Jun 29, 2026

Copy link
Copy Markdown

Add ToolCommandAdapter for Oh My Pi terminal AI coding agent.

  • New adapter: src/core/command-generation/adapters/oh-my-pi.ts
    • Commands: .omp/commands/opsx-.md with description frontmatter
    • Hyphen transform: /opsx: -> /opsx- (filename = command name)
    • Argument injection: Provided arguments: $@ after Input: heading
    • escapeYamlValue applied to description field
  • Register in CommandAdapterRegistry and adapters/index.ts
  • Add oh-my-pi to AI_TOOLS with skillsDir: '.omp'
  • Add to hyphen command transformer whitelist in init.ts and update.ts
  • Full test coverage (10 cases) in adapters.test.ts
  • Update docs/supported-tools.md with directory reference and tool ID

Closes #713

Summary by CodeRabbit

  • New Features
    • Added support for the Oh My Pi tool (oh-my-pi), including auto-detection during setup and correct generation during updates.
    • Generated Oh My Pi command and skill files using the expected naming and Markdown content conventions.
  • Bug Fixes
    • Improved command reference formatting to match Oh My Pi’s required style.
    • Automatically inserts provided-arguments placeholders when generating command content (without duplicating existing ones).
  • Documentation
    • Updated the supported tools documentation to include Oh My Pi.

@xianzheTM xianzheTM requested a review from TabishB as a code owner June 29, 2026 12:46
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fb03e7e9-6357-46a5-8097-f6799f6daa48

📥 Commits

Reviewing files that changed from the base of the PR and between 2f97ab8 and 3322f9e.

📒 Files selected for processing (15)
  • docs/supported-tools.md
  • openspec/changes/feat-add-omp-tool-support/.openspec.yaml
  • openspec/changes/feat-add-omp-tool-support/design.md
  • openspec/changes/feat-add-omp-tool-support/proposal.md
  • openspec/changes/feat-add-omp-tool-support/specs/cli-init/spec.md
  • openspec/changes/feat-add-omp-tool-support/specs/cli-update/spec.md
  • openspec/changes/feat-add-omp-tool-support/specs/oh-my-pi-tool/spec.md
  • openspec/changes/feat-add-omp-tool-support/tasks.md
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/adapters/oh-my-pi.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts
  • src/core/init.ts
  • src/core/update.ts
  • test/core/command-generation/adapters.test.ts
✅ Files skipped from review due to trivial changes (6)
  • openspec/changes/feat-add-omp-tool-support/specs/cli-update/spec.md
  • openspec/changes/feat-add-omp-tool-support/.openspec.yaml
  • openspec/changes/feat-add-omp-tool-support/proposal.md
  • docs/supported-tools.md
  • src/core/config.ts
  • openspec/changes/feat-add-omp-tool-support/tasks.md
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/core/command-generation/adapters/index.ts
  • openspec/changes/feat-add-omp-tool-support/specs/cli-init/spec.md
  • src/core/update.ts
  • src/core/command-generation/registry.ts
  • test/core/command-generation/adapters.test.ts
  • src/core/init.ts
  • src/core/command-generation/adapters/oh-my-pi.ts

📝 Walkthrough

Walkthrough

Adds Oh My Pi (oh-my-pi) as a supported OpenSpec tool. A new ohMyPiAdapter generates .omp/commands/opsx-<id>.md files with YAML description frontmatter, hyphen-command reference transformation, and $@ injection after **Input**: headings. The tool is registered in AI_TOOLS, CommandAdapterRegistry, and init/update transformer logic, with updated tests and docs.

Changes

Oh My Pi Tool Support

Layer / File(s) Summary
Specs, design, and proposal documents
openspec/changes/feat-add-omp-tool-support/*
New change-set documents describe OMP command and skill file generation, tool detection, task checklist items, and metadata for the change set.
ohMyPiAdapter implementation
src/core/command-generation/adapters/oh-my-pi.ts, src/core/command-generation/adapters/index.ts
New adapter implementing getFilePath (.omp/commands/opsx-<id>.md) and formatFile (YAML frontmatter, transformToHyphenCommands, injectOmpArgs); re-exported from the adapter index.
Registry, config, and init/update wiring
src/core/command-generation/registry.ts, src/core/config.ts, src/core/init.ts, src/core/update.ts
Registers ohMyPiAdapter in CommandAdapterRegistry; adds oh-my-pi entry to AI_TOOLS with skillsDir: '.omp'; extends hyphen-command transformer conditions in init.ts and both execute/upgradeLegacyTools paths in update.ts.
Tests and documentation
test/core/command-generation/adapters.test.ts, docs/supported-tools.md
Adds ohMyPiAdapter test coverage for identity, path generation, frontmatter, reference rewriting, YAML escaping, and $@ injection edge cases; extends the path test; adds Oh My Pi to supported-tools docs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • Fission-AI/OpenSpec#556: Adds related command-generation adapter infrastructure that this PR extends with a new tool adapter.
  • Fission-AI/OpenSpec#626: Introduced transformToHyphenCommands and related init/update wiring that this PR expands for oh-my-pi.
  • Fission-AI/OpenSpec#950: Added $@ injection and hyphen-command transformation behavior for another tool adapter, which this PR applies to oh-my-pi.

Suggested reviewers

  • TabishB
  • alfred-openspec

🐇 Oh My Pi joins the crew today,
.omp/commands/ lighting the way!
With $@ injected just right,
And YAML escaped tight,
The bunny hops off to play! 🥧

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding Oh My Pi tool support.
Linked Issues check ✅ Passed The changes implement Oh My Pi toolkit support with the adapter, registry, config, docs, and tests required by issue #713.
Out of Scope Changes check ✅ Passed The PR stays focused on Oh My Pi support and related documentation, configuration, and test updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
test/core/command-generation/adapters.test.ts (1)

22-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Import is out of alphabetical order.

ohMyPiAdapter should be imported before opencodeAdapter to maintain alphabetical ordering (oh < op). Move this import to between kilocodeAdapter (line 20) and opencodeAdapter (line 21).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/core/command-generation/adapters.test.ts` at line 22, The import order
in the adapter test setup is not alphabetical. Reorder the imports in
adapters.test.ts so that ohMyPiAdapter is placed before opencodeAdapter, keeping
it between kilocodeAdapter and opencodeAdapter and preserving the existing
alphabetical sequence among the adapter imports.
openspec/changes/feat-add-omp-tool-support/specs/oh-my-pi-tool/spec.md (1)

6-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Redundant phrasing: "follows after"

"follows after" is redundant; use "follows" or "comes after". Also, this sentence is very long and hard to parse. Consider breaking it into shorter sentences for clarity.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openspec/changes/feat-add-omp-tool-support/specs/oh-my-pi-tool/spec.md` at
line 6, The spec wording in the command-body requirements is too verbose and
includes redundant phrasing; update the text in the Oh My Pi tool spec to use
simpler language, replacing “follows after” with “follows” or “comes after” and
splitting the long sentence into shorter, clearer sentences. Keep the same
requirements in the spec entry that mentions the YAML frontmatter, `/opsx:` to
`/opsx-` transformation, and `**Provided arguments**: $@` injection, but rewrite
that description for readability.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@openspec/changes/feat-add-omp-tool-support/specs/oh-my-pi-tool/spec.md`:
- Line 6: The spec wording in the command-body requirements is too verbose and
includes redundant phrasing; update the text in the Oh My Pi tool spec to use
simpler language, replacing “follows after” with “follows” or “comes after” and
splitting the long sentence into shorter, clearer sentences. Keep the same
requirements in the spec entry that mentions the YAML frontmatter, `/opsx:` to
`/opsx-` transformation, and `**Provided arguments**: $@` injection, but rewrite
that description for readability.

In `@test/core/command-generation/adapters.test.ts`:
- Line 22: The import order in the adapter test setup is not alphabetical.
Reorder the imports in adapters.test.ts so that ohMyPiAdapter is placed before
opencodeAdapter, keeping it between kilocodeAdapter and opencodeAdapter and
preserving the existing alphabetical sequence among the adapter imports.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 859e2f0a-1a3f-42c2-ae7b-90b3407f037c

📥 Commits

Reviewing files that changed from the base of the PR and between 546224e and 2f97ab8.

📒 Files selected for processing (15)
  • docs/supported-tools.md
  • openspec/changes/feat-add-omp-tool-support/.openspec.yaml
  • openspec/changes/feat-add-omp-tool-support/design.md
  • openspec/changes/feat-add-omp-tool-support/proposal.md
  • openspec/changes/feat-add-omp-tool-support/specs/cli-init/spec.md
  • openspec/changes/feat-add-omp-tool-support/specs/cli-update/spec.md
  • openspec/changes/feat-add-omp-tool-support/specs/oh-my-pi-tool/spec.md
  • openspec/changes/feat-add-omp-tool-support/tasks.md
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/adapters/oh-my-pi.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts
  • src/core/init.ts
  • src/core/update.ts
  • test/core/command-generation/adapters.test.ts

Add ToolCommandAdapter for Oh My Pi terminal AI coding agent.

- New adapter: src/core/command-generation/adapters/oh-my-pi.ts
  - Commands: .omp/commands/opsx-<id>.md with description frontmatter
  - Hyphen transform: /opsx: -> /opsx- (filename = command name)
  - Argument injection: **Provided arguments**: $@ after **Input**: heading
  - escapeYamlValue applied to description field
- Register in CommandAdapterRegistry and adapters/index.ts
- Add oh-my-pi to AI_TOOLS with skillsDir: '.omp'
- Add to hyphen command transformer whitelist in init.ts and update.ts
- Full test coverage (10 cases) in adapters.test.ts
- Update docs/supported-tools.md with directory reference and tool ID

Closes Fission-AI#713
- Move ohMyPiAdapter import before opencodeAdapter (alphabetical order)
- Break long SHALL sentence and remove redundant 'follows after' in spec

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. I verified the OMP docs match the core assumptions: project commands live under .omp/commands/*.md, filename stem becomes the slash command, YAML description is valid, and $@ / $ARGUMENTS are supported for arguments.

The adapter follows the existing command-generation pattern, registers cleanly, applies hyphen command references in init/update/legacy upgrade, and has focused tests for path, YAML escaping, reference transform, and argument injection.

Verified locally: pnpm exec vitest run test/core/command-generation/adapters.test.ts passes, 103 tests.

@xianzheTM

Copy link
Copy Markdown
Author

@TabishB Hi maintainers, this PR has passed automated checks. Could someone take a look when you have a chance? I'm happy to make any changes if needed. Thanks for your time!

Sign up for free to 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.

Add support for oh-my-pi agent toolkit

2 participants