The design language that makes your AI harness better at design.
JavaScript
Add native Oh My Pi (OMP) provider support (#900)
bkutasi5165b74e4953
diff --git a/.github/workflows/sync-generated-output.yml b/.github/workflows/sync-generated-output.ymlindex 8f442401f..6d6e7c60a 100644--- a/.github/workflows/sync-generated-output.yml+++ b/.github/workflows/sync-generated-output.yml@@ -38,6 +38,7 @@ env:.kiro.opencode.pi+ .omp.qoder.rovodev.traediff --git a/crates/context/src/pin.rs b/crates/context/src/pin.rsindex 84cd22da6..791dcb544 100644--- a/crates/context/src/pin.rs+++ b/crates/context/src/pin.rs@@ -8,9 +8,9 @@ use impeccable_common::Io;/// keep in sync with the public repo).pub const COMMAND_METADATA_JSON: &str = include_str!("command-metadata.json");-const HARNESS_DIRS: [&str; 18] = [+const HARNESS_DIRS: [&str; 19] = [".claude", ".cursor", ".dsh", ".gemini", ".codex", ".agents", ".agent", ".github", ".grok", ".hermes", ".trae", ".trae-cn",- ".pi", ".opencode", ".kiro", ".rovodev", ".vibe", ".qoder",+ ".pi", ".omp", ".opencode", ".kiro", ".rovodev", ".vibe", ".qoder",];const CODEX_HARNESSES: [&str; 2] = [".codex", ".agents"];pub const VALID_COMMANDS: [&str; 24] = [diff --git a/crates/context/src/provider.rs b/crates/context/src/provider.rsindex d95e961a4..6808fbf73 100644--- a/crates/context/src/provider.rs+++ b/crates/context/src/provider.rs@@ -70,6 +70,7 @@ fn provider_from_skill_dir(skill_dir: &str) -> Option<&'static str> {".kiro" => "kiro",".opencode" => "opencode",".pi" => "pi",+ ".omp" => "omp",".qoder" => "qoder",".trae" => "trae",".trae-cn" => "trae-cn",diff --git a/crates/skills/src/providers.rs b/crates/skills/src/providers.rsindex a399d6e00..df7a20f51 100644--- a/crates/skills/src/providers.rs+++ b/crates/skills/src/providers.rs@@ -9,7 +9,7 @@ pub const API_BASE: &str = "https://impeccable.style";pub const PROVIDER_DIRS: &[&str] = &[".claude", ".cursor", ".dsh", ".gemini", ".agents", ".agent", ".github", ".grok", ".hermes", ".kiro",- ".opencode", ".pi", ".qoder", ".trae", ".trae-cn", ".rovodev", ".vibe",+ ".opencode", ".pi", ".omp", ".qoder", ".trae", ".trae-cn", ".rovodev", ".vibe",];const PROVIDER_ALIASES: &[(&str, &str)] = &[@@ -33,6 +33,8 @@ const PROVIDER_ALIASES: &[(&str, &str)] = &[("kiro", ".kiro"),("opencode", ".opencode"),("pi", ".pi"),+ ("omp", ".omp"),+ ("oh-my-pi", ".omp"),("qoder", ".qoder"),("rovo-dev", ".rovodev"),("rovodev", ".rovodev"),@@ -54,6 +56,7 @@ const PROVIDER_DISPLAY: &[(&str, &str, &str)] = &[(".kiro", "Kiro", "kiro"),(".opencode", "OpenCode", "opencode"),(".pi", "Pi Coding Agent", "pi"),+ (".omp", "Oh My Pi", "omp"),(".qoder", "Qoder", "qoder"),(".rovodev", "Rovo Dev", "rovo-dev"),(".trae", "Trae", "trae"),@@ -63,7 +66,7 @@ const PROVIDER_DISPLAY: &[(&str, &str, &str)] = &[pub const PROVIDER_INPUT_ORDER: &[&str] = &["antigravity", "claude", "codex", "cursor", "dsh", "gemini", "github", "grok", "hermes", "kiro",- "opencode", "pi", "qoder", "trae", "trae-cn", "rovo-dev", "vibe",+ "opencode", "pi", "omp", "qoder", "trae", "trae-cn", "rovo-dev", "vibe",];pub const DEFAULT_TARGETS: &[&str] = &[".claude", ".agents"];@@ -119,13 +122,14 @@ fn home_skills_dir_override(env: &Env, cwd: &str, provider: &str, home: &str) ->".dsh" => Some(jsp::join(&[&dsh_global_home(env, cwd, home), "skills"])),".hermes" => Some(jsp::join(&[&hermes_global_home(env, cwd, home), "skills"])),".pi" => Some(jsp::join(&[home, ".pi", "agent", "skills"])),+ ".omp" => Some(jsp::join(&[home, ".omp", "agent", "skills"])),".opencode" => Some(jsp::join(&[&opencode_global_config_dir(env, home), "skills"])),_ => None,}}fn has_home_override(provider: &str) -> bool {- matches!(provider, ".agent" | ".dsh" | ".hermes" | ".pi" | ".opencode")+ matches!(provider, ".agent" | ".dsh" | ".hermes" | ".pi" | ".omp" | ".opencode")}/// Everything the scans need from the process: env, cwd, and the resolved@@ -477,6 +481,7 @@ const GLOBAL_HARNESS_HINTS: &[Hint] = &[Hint::Home(".opencode", ".opencode"),Hint::OpencodeConfig(".opencode"),Hint::Home(".pi", ".pi"),+ Hint::Home(".omp", ".omp"),Hint::Home(".qoder", ".qoder"),Hint::Home(".rovodev", ".rovodev"),Hint::Home(".vibe", ".vibe"),@@ -795,6 +800,19 @@ mod tests {assert_eq!(invalid, vec!["zzz"]);}+ #[test]+ fn omp_provider_resolves_paths() {+ assert_eq!(normalize_provider_name("omp"), Some(".omp"));+ assert_eq!(normalize_provider_name("oh-my-pi"), Some(".omp"));++ let home = if cfg!(windows) { r"C:\Users\u" } else { "/home/u" };+ let sys = Sys { env: Env::new(), cwd: home.into(), home: home.into() };++ assert_eq!(sys.user_provider_skills_dir(&home, ".omp"), jsp::join(&[&home, ".omp", "agent", "skills"]));+ assert_eq!(sys.provider_skills_dir_candidates("/project", ".omp", Some(Scope::Project)), vec![jsp::join(&["/project", ".omp", "skills"])]);++ }+#[test]fn dsh_provider_resolves() {assert_eq!(normalize_provider_name("dsh"), Some(".dsh"));diff --git a/docs/CLI-CONTRACT.md b/docs/CLI-CONTRACT.mdindex eed9a060f..704b7bde6 100644--- a/docs/CLI-CONTRACT.md+++ b/docs/CLI-CONTRACT.md@@ -401,7 +401,7 @@ retain their local-development trust behavior. See [bundle signing](BUNDLE-SIGNI- **Invoked from**: README.md ("npx impeccable install / update"), README.npm.md Quick Start (`npx impeccable skills install`, `... install -y --providers=claude,codex --scope=project`, `... update`, `... install --no-hooks`, `... link --source=.impeccable --providers=claude,cursor`, `... skills help`), `README.md:360` (hook consent explanation).- `run(args)`: `args[0]` ∈ `undefined|help|--help|-h` → `showHelp()`; `install` → `install(rest)`; `link`; `update`; `check` (ignores flags); else `stderr> Unknown skills command: ${sub}` + `Run 'impeccable --help' for available commands.`, `exit 1`.-- Constants: `API_BASE = 'https://impeccable.style'`; `PROVIDER_DIRS = ['.claude','.cursor','.dsh','.gemini','.agents','.agent','.github','.grok','.hermes','.kiro','.opencode','.pi','.qoder','.trae','.trae-cn','.rovodev','.vibe']`; aliases (`agent`→`.agent`, `agents`/`codex`→`.agents`, `antigravity`→`.agent`, `claude`/`claude-code`→`.claude`, `copilot`/`github`→`.github`, `cursor`, `deepseek`/`deepseek-harness`/`dsh`→`.dsh`, `gemini`, `grok`/`grok-build`/`xai`→`.grok`, `hermes`, `kiro`, `opencode`, `pi`, `qoder`, `rovo-dev`/`rovodev`→`.rovodev`, `trae`, `trae-cn`, `vibe`); leading `.` stripped and lowercased before alias lookup; a literal PROVIDER_DIR value is accepted as-is. `DEFAULT_TARGETS = ['.claude','.agents']`. User-scope skill dir overrides: `.agent`→`~/.gemini/config/skills`, `.dsh`→`$DSH_HOME/skills` (only when DSH_HOME under home) else `~/.dsh/skills`, `.hermes`→`$HERMES_HOME/skills` (only when HERMES_HOME under home) else `~/.hermes/skills`, `.pi`→`~/.pi/agent/skills`, `.opencode`→`$OPENCODE_CONFIG_DIR|$XDG_CONFIG_HOME/opencode|~/.config/opencode` + `/skills`; others `~/<provider>/skills`. Project scope: `<root>/<provider>/skills`.+- Constants: `API_BASE = 'https://impeccable.style'`; `PROVIDER_DIRS = ['.claude','.cursor','.dsh','.gemini','.agents','.agent','.github','.grok','.hermes','.kiro','.opencode','.pi','.omp','.qoder','.trae','.trae-cn','.rovodev','.vibe']`; aliases (`agent`→`.agent`, `agents`/`codex`→`.agents`, `antigravity`→`.agent`, `claude`/`claude-code`→`.claude`, `copilot`/`github`→`.github`, `cursor`, `deepseek`/`deepseek-harness`/`dsh`→`.dsh`, `gemini`, `grok`/`grok-build`/`xai`→`.grok`, `hermes`, `kiro`, `opencode`, `pi`, `omp`/`oh-my-pi`→`.omp`, `qoder`, `rovo-dev`/`rovodev`→`.rovodev`, `trae`, `trae-cn`, `vibe`); leading `.` stripped and lowercased before alias lookup; a literal PROVIDER_DIR value is accepted as-is. `DEFAULT_TARGETS = ['.claude','.agents']`. User-scope skill dir overrides: `.agent`→`~/.gemini/config/skills`, `.dsh`→`$DSH_HOME/skills` (only when DSH_HOME under home) else `~/.dsh/skills`, `.hermes`→`$HERMES_HOME/skills` (only when HERMES_HOME under home) else `~/.hermes/skills`, `.pi`→`~/.pi/agent/skills`, `.omp`→`~/.omp/agent/skills`, `.opencode`→`$OPENCODE_CONFIG_DIR|$XDG_CONFIG_HOME/opencode|~/.config/opencode` + `/skills`; others `~/<provider>/skills`. Project scope: `<root>/<provider>/skills`.- **help**: `fetch('https://impeccable.style/api/commands')` → JSON array `[{id, description}]`; failure → `stderr> Could not fetch command list from impeccable.style. Check your network connection.`, `exit 1`. Prints:```diff --git a/docs/HARNESSES.md b/docs/HARNESSES.mdindex 83817abed..04f330535 100644--- a/docs/HARNESSES.md+++ b/docs/HARNESSES.md@@ -67,6 +67,7 @@ Notes:- Antigravity supports standard Agent Skills spec frontmatter fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`).- OpenCode 1.18.10 recognises only the spec subset on SKILL.md (`name`, `description`, `license`, `compatibility`, `metadata`). Claude-style extensions (`user-invocable`, `argument-hint`, `allowed-tools`, `model`, `agent`) are silently ignored; Impeccable still emits them today for other harnesses, but they have no effect in OpenCode. Use `commands/<name>.md` (see Placeholder / Variable Substitution below) for slash UX; OpenCode honours only `description`, `agent`, `model`, `variant`, `subtask` on command files.- DeepSeek Harness parses the Agent Skills frontmatter and requires `name` and `description`; it reads `metadata`, `user-invocable`, and `disable-model-invocation`. Spec fields it does not consume (`license`, `compatibility`, `allowed-tools`) and Claude-style extensions (`argument-hint`, `model`, `effort`, `context`, `agent`, `hooks`) are silently ignored. Hooks are in-process plugins configured via cordis.yml, not on-disk manifests, so there is no hook surface to install. Subagents exist but are composed from preset config, not an on-disk skill-adjacent format. Verified against the [filesystem skill provider](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/skill/skill-filesystem/README.md).+- Oh My Pi supports standard Agent Skills frontmatter fields and `disable-model-invocation`; other harness-specific extensions are ignored.- Unknown fields are silently ignored by all harnesses.## Hook surface used by Impeccable@@ -77,6 +78,7 @@ Notes:| Codex CLI | Yes (`PostToolUse`) | No | `.codex/hooks.json` | Project-local manifest installed with the `.agents/skills/impeccable` payload. Runs `.agents/skills/impeccable/scripts/hook.mjs` from the git root. Requires normal `/hooks` trust approval. || Cursor | Yes (`preToolUse`) | No | `.cursor/hooks.json` | Project-level manifest installed with `.cursor/skills/impeccable`. Runs `hook-before-edit.mjs` to block bad proposed writes before they land. Reloads on save; restart Cursor if hooks do not pick up. || Grok Build | Yes (`PostToolUse`) | No | `.grok/hooks/impeccable.json` | Project-local manifest installed with `.grok/skills/impeccable`. Claude-compatible matchers (`Edit\|Write\|MultiEdit`) alias to Grok `search_replace`. PostToolUse runs the scan and warms the session cache; Grok ignores that stdout. Stop `additionalContext` is the user-visible pass. Ignore Grok's observe-only Stop with `reason: "shutdown"`. Requires `/hooks-trust` or `--trust`. Plugin installs use `plugin/hooks/hooks.json` with `${CLAUDE_PLUGIN_ROOT}` (aliased to `GROK_PLUGIN_ROOT`). |+| Oh My Pi | No | No | n/a | Runtime hooks use `pi-extension`; no `hooks.json` manifest surface. || All other harnesses | No | No | n/a | No documented hook surface today. Skill and commands still ship. |## Skill Directory Structure@@ -92,6 +94,7 @@ Notes:| Kiro | `.kiro/skills/` | - || OpenCode | `.opencode/skills/` | `.agents/skills/`, `.claude/skills/` || Pi | `.pi/skills/` (project), `~/.pi/agent/skills/` (global) | `.agents/skills/` |+| Oh My Pi | `.omp/skills/` (project), `~/.omp/agent/skills/` (global) | `.agents/skills/` || Qoder | `.qoder/skills/` | `~/.qoder/skills/` (user-level) || Trae China | `.trae-cn/skills/` | TBD || Trae International | `.trae/skills/` | TBD |diff --git a/scripts/build.js b/scripts/build.jsindex 5473ed797..d1c3eefa2 100644--- a/scripts/build.js+++ b/scripts/build.js@@ -654,6 +654,7 @@ This folder contains skills for all supported tools:.kiro/ -> Kiro.opencode/ -> OpenCode.pi/ -> Pi+ .omp/ -> Oh My Pi.trae-cn/ -> Trae China.trae/ -> Trae International.rovodev/ -> Rovo Devdiff --git a/scripts/lib/transformers/index.js b/scripts/lib/transformers/index.jsindex 23ee12b74..1082aebe1 100644--- a/scripts/lib/transformers/index.js+++ b/scripts/lib/transformers/index.js@@ -12,6 +12,7 @@ export const transformAgents = createTransformer(PROVIDERS.agents);export const transformGitHub = createTransformer(PROVIDERS.github);export const transformKiro = createTransformer(PROVIDERS.kiro);export const transformOpenCode = createTransformer(PROVIDERS.opencode);+export const transformOmp = createTransformer(PROVIDERS.omp);export const transformPi = createTransformer(PROVIDERS.pi);export const transformQoder = createTransformer(PROVIDERS.qoder);export const transformRovoDev = createTransformer(PROVIDERS['rovo-dev']);diff --git a/scripts/lib/transformers/providers.js b/scripts/lib/transformers/providers.jsindex e712d884e..5983e3e5f 100644--- a/scripts/lib/transformers/providers.js+++ b/scripts/lib/transformers/providers.js@@ -124,6 +124,13 @@ export const PROVIDERS = {displayName: 'Pi',frontmatterFields: ['license', 'compatibility', 'metadata', 'allowed-tools'],},+ omp: {+ provider: 'omp',+ providerTags: ['omp'],+ configDir: '.omp',+ displayName: 'Oh My Pi',+ frontmatterFields: ['license', 'compatibility', 'metadata', 'allowed-tools'],+ },qoder: {provider: 'qoder',providerTags: ['qoder'],diff --git a/scripts/lib/utils.js b/scripts/lib/utils.jsindex ebf928f38..82fd85a80 100644--- a/scripts/lib/utils.js+++ b/scripts/lib/utils.js@@ -470,6 +470,12 @@ export const PROVIDER_PLACEHOLDERS = {ask_instruction: 'Ask the user directly to clarify what you cannot infer.',command_prefix: '/'},+ 'omp': {+ model: 'the model',+ config_file: 'AGENTS.md',+ ask_instruction: 'Ask the user directly to clarify what you cannot infer.',+ command_prefix: '/'+ },'qoder': {model: 'the model',config_file: 'AGENTS.md',@@ -538,6 +544,7 @@ export const PROVIDER_BLOCK_TAGS = new Set(['kiro','opencode','pi',+ 'omp','qoder','rovo-dev','trae',diff --git a/tests/build.test.js b/tests/build.test.jsindex d2a53896c..d71d64105 100644--- a/tests/build.test.js+++ b/tests/build.test.js@@ -148,6 +148,7 @@ This is a test skill body.`;transformers.transformClaudeCode(skills, DIST_DIR, patterns);transformers.transformGemini(skills, DIST_DIR, patterns);transformers.transformCodex(skills, DIST_DIR, patterns);+ transformers.transformOmp(skills, DIST_DIR, patterns);transformers.transformAntigravity(skills, DIST_DIR, patterns);// Verify Cursor outputs@@ -345,18 +346,20 @@ Please audit {{target}} for technical quality. Ask {{model}} for help.`;transformCodexSpy.mockRestore();});- test('should include agents and kiro transformers', () => {+ test('should include agents, omp, and kiro transformers', () => {const { skills } = utils.readSourceFiles(TEST_DIR);const patterns = utils.readPatterns(TEST_DIR);const DIST_DIR = path.join(TEST_DIR, 'dist');// These should not throwtransformers.transformAgents(skills, DIST_DIR, patterns);+ transformers.transformOmp(skills, DIST_DIR, patterns);transformers.transformGitHub(skills, DIST_DIR, patterns);transformers.transformKiro(skills, DIST_DIR, patterns);// Verify outputsexpect(fs.existsSync(path.join(DIST_DIR, 'agents/.agents/skills'))).toBe(true);+ expect(fs.existsSync(path.join(DIST_DIR, 'omp/.omp/skills'))).toBe(true);expect(fs.existsSync(path.join(DIST_DIR, 'github/.github/skills'))).toBe(true);expect(fs.existsSync(path.join(DIST_DIR, 'kiro/.kiro/skills'))).toBe(true);});diff --git a/tests/hook-build.test.mjs b/tests/hook-build.test.mjsindex 3ac8311ab..365f3ab17 100644--- a/tests/hook-build.test.mjs+++ b/tests/hook-build.test.mjs@@ -261,6 +261,7 @@ describe('hook manifest builders', () => {assert.ok(hooksJsonFor('github'));assert.ok(hooksJsonFor('grok'));assert.ok(hooksJsonFor('gemini'));+ assert.equal(hooksJsonFor('omp'), null);assert.equal(hooksJsonFor('unrecognized'), null);});});diff --git a/tests/lib/provider-blocks.test.js b/tests/lib/provider-blocks.test.jsindex 7750455c9..824bc0dde 100644--- a/tests/lib/provider-blocks.test.js+++ b/tests/lib/provider-blocks.test.js@@ -19,6 +19,13 @@ describe('compileProviderBlocks', () => {].join('\n'));});+ test('compiles omp blocks only for omp output', () => {+ const content = ['<omp>', 'OMP-only guidance.', '</omp>'].join('\n');++ expect(compileProviderBlocks(content, ['omp'])).toBe('OMP-only guidance.');+ expect(compileProviderBlocks(content, ['cursor'])).toBe('');+ });+test('removes non-matching provider blocks', () => {const content = ['Before',diff --git a/tests/lib/transformers/providers.test.js b/tests/lib/transformers/providers.test.jsindex 91ea6faa8..f96546cb4 100644--- a/tests/lib/transformers/providers.test.js+++ b/tests/lib/transformers/providers.test.js@@ -65,6 +65,16 @@ for (const [key, config] of Object.entries(PROVIDERS)) {expect(fs.existsSync(refPath)).toBe(true);});+ if (key === 'omp') {+ test('uses Pi-style guidance placeholders rather than Cursor fallbacks', () => {+ const skills = [{ name: 'test', description: 'Test', body: 'Read {{config_file}} before asking {{model}}.' }];+ transform(skills, TEST_DIR);+ const content = fs.readFileSync(skillPath(config, 'test'), 'utf-8');+ expect(content).toContain('Read AGENTS.md before asking the model.');+ expect(content).not.toContain('.cursorrules');+ });+ }+if (key === 'dsh') {test('uses DSH tools and resource paths without installing unsupported hooks or agents', () => {transform([{diff --git a/tests/workflow-security.test.js b/tests/workflow-security.test.jsindex 14e95f695..eb16bff10 100644--- a/tests/workflow-security.test.js+++ b/tests/workflow-security.test.js@@ -27,7 +27,9 @@ describe('workflow execution boundaries', () => {});test('generated-output sync and sheriff retain their required write access', () => {- expect(workflows['sync-generated-output.yml'].permissions).toEqual({ contents: 'write' });+ const sync = workflows['sync-generated-output.yml'];+ expect(sync.permissions).toEqual({ contents: 'write' });+ expect(sync.env.GENERATED_PATHS.split(/\s+/)).toContain('.omp');expect(workflows['sheriff.yml'].permissions).toEqual({actions: 'read', checks: 'read', contents: 'read', issues: 'write', 'pull-requests': 'write',});