feat(plugins): add official OpenSpec plugin for spec-driven development#1498
feat(plugins): add official OpenSpec plugin for spec-driven development#1498bj456736 wants to merge 1 commit into
Conversation
|
commit: |
Add kimi-openspec official plugin that integrates Fission-AI OpenSpec CLI into Kimi Code via MCP stdio transport. Features: - 11 OpenSpec tools: init, new_change, list, show, status, validate, archive, update, instructions, read_file, refresh_cache - Built-in openspec_kickoff prompt for spec-driven workflow initialization - In-memory cache of openspec/ directory for fast listing operations - Direct file reading via read_file to bypass CLI subprocess overhead - Auto-installs @fission-ai/openspec via npx --yes The plugin is registered in plugins/marketplace.json as an official plugin. Closes discussion MoonshotAI#927
d400a4d to
8d2eb73
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d400a4dd2c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -0,0 +1,17 @@ | |||
| { | |||
| "id": "kimi-openspec", | |||
| "name": "OpenSpec", | |||
There was a problem hiding this comment.
Use a valid Kimi plugin manifest
The plugin parser treats name as the plugin id and requires it to match the lowercase plugin-name regex; this OpenSpec value makes parseManifest() reject the manifest, so installing the marketplace entry fails before any MCP server or skill can load. The display label belongs in interface.displayName, and the executable should be declared through mcpServers rather than the unsupported entry shape below.
Useful? React with 👍 / 👎.
| const args = params?.arguments ?? {}; | ||
|
|
||
| const runOpenSpec = async (callArgs) => { | ||
| const cmd = `${OPENSPEC_CMD} ${callArgs.join(' ')}`; |
There was a problem hiding this comment.
Avoid building OpenSpec commands through the shell
For any tool call where name, description, changeName, or similar arguments come from the model/user, a value containing shell syntax can break out of the ad-hoc quotes and execute arbitrary commands inside this exec invocation. Build the command as an argv array with execFile/spawn (for example npx, --yes, @fission-ai/openspec, ...args) instead of concatenating shell text.
Useful? React with 👍 / 👎.
|
|
||
| async function start() { | ||
| const args = process.argv.slice(2); | ||
| const projectPath = args[0] || process.cwd(); |
There was a problem hiding this comment.
Pass the user workspace into the MCP server
When Kimi launches plugin MCP servers, the plugin manager sets the process cwd to the installed plugin root, and this server falls back to process.cwd() unless an explicit path argument is provided. Since the plugin manifest does not pass the session workspace, openspec_init, openspec_new_change, and the cache/list/read operations will act on the managed plugin directory instead of the user's repository.
Useful? React with 👍 / 👎.
Summary
Add
kimi-openspecofficial plugin that integrates Fission-AI OpenSpec CLI into Kimi Code via MCP stdio transport.Resolves discussion #927: Native OpenSpec & Spec-Kit Integration
Features
openspec_kickofffor spec-driven workflow initializationopenspec/directory for fast listing operationsread_fileto bypass CLI subprocess overhead@fission-ai/openspecvianpx --yesArchitecture
The plugin is a self-contained MCP server (
bin/kimi-openspec.mjs) that:@fission-ai/openspecCLI commandsopenspec/changes/andopenspec/specs/directoriesopenspec_read_fileopenspec_kickoffpromptFiles Added
plugins/official/kimi-openspec/kimi.plugin.jsonplugins/official/kimi-openspec/SKILL.mdplugins/official/kimi-openspec/bin/kimi-openspec.mjsplugins/marketplace.json(registered as official plugin)Testing
Verified locally with test MCP client:
openspec_initinitializes project correctlyopenspec_new_changecreates change scaffoldingopenspec_listreturns cached entries after mutationopenspec_statusreturns detailed artifact completionopenspec_read_filereads artifacts directlyprompts/get openspec_kickoffreturns workflow promptChecklist
plugins/marketplace.json