From 16a1719988c5cd369a50a169b10cf529780c5893 Mon Sep 17 00:00:00 2001 From: Drew Ritter Date: Mon, 1 Jun 2026 15:12:13 -0700 Subject: [PATCH] Tighten Kimi plugin porting coverage --- .kimi-plugin/plugin.json | 2 +- docs/README.kimi.md | 5 ++++- .../test-sync-to-codex-plugin.sh | 10 ++++++++-- tests/kimi/test-plugin-manifest.sh | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.kimi-plugin/plugin.json b/.kimi-plugin/plugin.json index b5a9954c..66c9d5fb 100644 --- a/.kimi-plugin/plugin.json +++ b/.kimi-plugin/plugin.json @@ -22,7 +22,7 @@ "sessionStart": { "skill": "using-superpowers" }, - "skillInstructions": "Kimi Code tool mapping for Superpowers skills:\n\n- When a Superpowers skill says to ask the user, ask clarifying questions, ask one question at a time, present multiple-choice options, use the terminal for a question, or wait for the user's choice, call Kimi Code's `AskUserQuestion` tool. Do not render those choices as plain assistant text unless `AskUserQuestion` is unavailable or the session is in auto permission mode.\n- For `AskUserQuestion`, provide 1 question with 2-4 concrete options when possible. Put the recommended option first and suffix its label with `(Recommended)`.\n- When a Superpowers skill refers to `TodoWrite`, use Kimi Code's `TodoList` tool.\n- When a Superpowers skill says `Task tool (general-purpose)` or asks you to dispatch an implementer/reviewer subagent, use Kimi Code's `Agent` tool with a Kimi subagent type. Do not pass `general-purpose` as `subagent_type`.\n- For implementation, code review, spec review, quality review, and filled Superpowers subagent prompt templates, call `Agent` with `subagent_type: \"coder\"`, paste the fully filled prompt into `prompt`, and provide a short `description`.\n- For read-only codebase exploration that would take several searches, use `Agent` with `subagent_type: \"explore\"`.\n- For read-only planning or architecture design, use `Agent` with `subagent_type: \"plan\"`.\n- Keep dependent Superpowers subagent steps sequential. Use multiple `Agent` calls, or `run_in_background: true` only when the work is independent and background agents are available.\n- When a Superpowers skill refers to the `Skill` tool, use Kimi Code's native `Skill` tool.\n- Use Kimi Code's `Read`, `Write`, `Edit`, `Bash`, `WebSearch`, and MCP tools by their actual exposed names.", + "skillInstructions": "Kimi Code tool mapping for Superpowers skills:\n\n- When a Superpowers skill says to ask the user, ask clarifying questions, ask one question at a time, present multiple-choice options, use the terminal for a question, or wait for the user's choice, call Kimi Code's `AskUserQuestion` tool. Do not render those choices as plain assistant text unless `AskUserQuestion` is unavailable or the session is in auto permission mode.\n- For `AskUserQuestion`, provide 1 question with 2-4 concrete options when possible. Put the recommended option first and suffix its label with `(Recommended)`.\n- When a Superpowers skill refers to `TodoWrite`, use Kimi Code's `TodoList` tool.\n- When a Superpowers skill says `Task tool (general-purpose)` or asks you to dispatch an implementer/reviewer subagent, use Kimi Code's `Agent` tool with a Kimi subagent type. Do not pass `general-purpose` as `subagent_type`.\n- For implementation, code review, spec review, quality review, and filled Superpowers subagent prompt templates, call `Agent` with `subagent_type: \"coder\"`, paste the fully filled prompt into `prompt`, and provide a short `description`.\n- For read-only codebase exploration that would take several searches, use `Agent` with `subagent_type: \"explore\"`.\n- For read-only planning or architecture design, use `Agent` with `subagent_type: \"plan\"`.\n- Keep dependent Superpowers subagent steps sequential. Use multiple `Agent` calls, or `run_in_background: true` only when the work is independent and background agents are available.\n- When a Superpowers skill refers to the `Skill` tool, use Kimi Code's native `Skill` tool.\n- Use Kimi Code's `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`, `FetchURL`, `WebSearch`, and MCP tools by their actual exposed names.\n- When a skill asks to search file contents, use `Grep`; when it asks to find files by path or pattern, use `Glob`; when it asks to fetch a URL, use `FetchURL`; when it asks to search the web, use `WebSearch`.", "interface": { "displayName": "Superpowers", "shortDescription": "Planning, TDD, debugging, and delivery workflows for coding agents", diff --git a/docs/README.kimi.md b/docs/README.kimi.md index 12d142ce..0d7cd74d 100644 --- a/docs/README.kimi.md +++ b/docs/README.kimi.md @@ -12,7 +12,7 @@ Open the plugin manager: /plugins ``` -Search for Superpowers and install it. +Go to `Marketplace` > `Superpowers` and install it. You can also install from this repository: @@ -50,6 +50,9 @@ Skills describe actions instead of hard-coding one runtime's tool names. On Kimi - "Invoke a skill" -> Kimi Code's native `Skill` tool - "Read a file" / "write a file" / "edit a file" -> `Read`, `Write`, `Edit` - "Run a shell command" -> `Bash` +- "Search file contents" -> `Grep` +- "Find files by path or pattern" -> `Glob` +- "Fetch a URL" -> `FetchURL` - "Search the web" -> `WebSearch` ## Updating diff --git a/tests/codex-plugin-sync/test-sync-to-codex-plugin.sh b/tests/codex-plugin-sync/test-sync-to-codex-plugin.sh index 60af21a4..86daceee 100755 --- a/tests/codex-plugin-sync/test-sync-to-codex-plugin.sh +++ b/tests/codex-plugin-sync/test-sync-to-codex-plugin.sh @@ -424,10 +424,15 @@ EOF write_stale_ignored_destination_fixture() { local repo="$1" - mkdir -p "$repo/plugins/superpowers/.private-journal" + mkdir -p \ + "$repo/plugins/superpowers/.kimi-plugin" \ + "$repo/plugins/superpowers/.private-journal" printf 'fixture keep\n' > "$repo/plugins/superpowers/.fixture-keep" + printf '{"name":"stale-kimi"}\n' > "$repo/plugins/superpowers/.kimi-plugin/plugin.json" printf 'stale ignored leak\n' > "$repo/plugins/superpowers/.private-journal/leak.txt" - git -C "$repo" add plugins/superpowers/.fixture-keep + git -C "$repo" add \ + plugins/superpowers/.fixture-keep \ + plugins/superpowers/.kimi-plugin/plugin.json commit_fixture "$repo" "Initial stale ignored destination fixture" } @@ -654,6 +659,7 @@ main() { echo "" echo "Convergence assertions..." assert_equals "$stale_preview_status" "0" "Stale ignored destination preview exits successfully" + assert_matches "$stale_preview_section" "\\*deleting +\\.kimi-plugin/plugin\\.json" "Preview deletes stale Kimi manifest from Codex plugin" assert_matches "$stale_preview_section" "\\*deleting +\\.private-journal/leak\\.txt" "Preview deletes stale ignored destination file" echo "" diff --git a/tests/kimi/test-plugin-manifest.sh b/tests/kimi/test-plugin-manifest.sh index 0040697a..073ab84c 100755 --- a/tests/kimi/test-plugin-manifest.sh +++ b/tests/kimi/test-plugin-manifest.sh @@ -42,10 +42,29 @@ for token in [ "Write", "Edit", "Bash", + "Grep", + "Glob", + "FetchURL", "WebSearch", ]: assert_present(instructions, token, "skillInstructions") +version_config = json.loads( + (manifest_path.parents[1] / ".version-bump.json").read_text(encoding="utf-8") +) +version_entries = version_config.get("files") +if not isinstance(version_entries, list): + raise AssertionError(".version-bump.json must contain files list") + +if not any( + entry.get("path") == ".kimi-plugin/plugin.json" and entry.get("field") == "version" + for entry in version_entries + if isinstance(entry, dict) +): + raise AssertionError( + ".version-bump.json must update .kimi-plugin/plugin.json version" + ) + unsupported_fields = [ "tools", "commands",