Skip to content

feat: add MiniMax Code skills support - #1214

Merged
clay-good merged 8 commits into
Fission-AI:mainfrom
showms:codex/add-minimax-code-tool-support
Aug 5, 2026
Merged

feat: add MiniMax Code skills support#1214
clay-good merged 8 commits into
Fission-AI:mainfrom
showms:codex/add-minimax-code-tool-support

Conversation

@showms

@showms showms commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Status

Ready for refreshed review. The branch is forward-ported to current main, all conflicts are resolved, and GitHub reports it as mergeable.

What was missing / the motivation

OpenSpec did not support MiniMax Code's global skills directory, so MiniMax users could not install the OpenSpec workflows through openspec init.

What it does

  • Adds minimax-code as a skills-only tool.
  • Resolves its skills under ~/.minimax/skills.
  • Writes and detects only OpenSpec-managed openspec-* skill directories.
  • Preserves global MiniMax skills in commands-only mode, because one project's delivery setting must not remove skills shared by other projects.
  • Never creates repo-local .minimax or .mavis fallback directories.
  • Keeps existing project-local tool behavior and init summaries unchanged.

Proof it works

  • node build.js
  • eslint .
  • tsc --noEmit
  • Full suite: 120 test files and 3,487 tests passed.
  • Regression coverage verifies global path resolution, init/update behavior, managed-skill detection, commands-only preservation, profile drift, and an isolated --tools all end-to-end install.

Notes / nits

  • This is a bounded tool-integration change. It does not introduce or modify workspace, context-store, proposal, spec, or command-generation architecture.
  • MiniMax Code has no OpenSpec command adapter; users invoke the installed skills through MiniMax Code.
  • Includes a minor changeset because this adds a supported tool target.

Summary by CodeRabbit

  • New Features

    • Added MiniMax Code as a supported skills-only integration.
    • Skills are installed and detected in the global user skills directory.
    • Added MiniMax Code support to CLI tool selection and non-interactive initialization.
    • Existing global skills are preserved when using commands-only delivery.
  • Documentation

    • Documented setup, command syntax, installation paths, and supported tool identifiers for MiniMax Code.

@showms
showms requested a review from TabishB as a code owner June 15, 2026 10:02
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

MiniMax Code is registered as a global skills-only tool. Shared helpers resolve project and home-based skill paths. Detection, initialization, updates, migration, drift checks, tests, CLI wiring, and documentation support the new target.

Changes

MiniMax Code global-skills integration

Layer / File(s) Summary
Tool metadata contract and shared skill-path utilities
src/core/config.ts, src/core/shared/skill-paths.ts, src/core/shared/index.ts, test/core/shared/skill-paths.test.ts
Adds globalSkillsDir, registers MiniMax Code, and resolves skill paths from project or home directories.
CLI and tool detection wiring
src/cli/index.ts, src/core/available-tools.ts, src/core/shared/tool-detection.ts, test/core/available-tools.test.ts, test/core/shared/tool-detection.test.ts
Detects skill-capable tools and finds MiniMax Code skills under the global home target.
Init flow with resolved paths and global-target retention
src/core/init.ts, test/core/init.test.ts
Writes MiniMax Code skills to the global target, skips adapter command directories, and preserves global skills for commands-only delivery.
Update, migration, and drift behavior
src/core/update.ts, src/core/migration.ts, src/core/profile-sync-drift.ts, test/core/update.test.ts, test/core/profile-sync-drift.test.ts
Uses resolved skill paths across workflow operations and avoids local cleanup for global targets.
Documentation and release metadata
docs/cli.md, docs/commands.md, docs/supported-tools.md, .changeset/add-minimax-code-skills.md
Documents MiniMax Code IDs, invocation, global installation, and release metadata.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: tabishb, alfred-openspec, clay-good

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.59% 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 MiniMax Code skills support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/core/init.ts (1)

667-676: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Success output reports command location incorrectly.

The summary prints command counts using tool.skillsPath, which can state commands are in the skills directory (not true for adapter-based tools) and is especially misleading for minimax-code where commands are skipped.

Proposed adjustment
-      if (skillCount > 0 && commandCount > 0) {
-        console.log(`${skillCount} skills and ${commandCount} commands in ${toolDirs}/`);
-      } else if (skillCount > 0) {
+      if (skillCount > 0) {
         console.log(`${skillCount} skills in ${toolDirs}/`);
-      } else if (commandCount > 0) {
-        console.log(`${commandCount} commands in ${toolDirs}/`);
+      }
+
+      const generatedCommandTools = successfulTools.filter(
+        (t) => !results.commandsSkipped.includes(t.value) && CommandAdapterRegistry.get(t.value)
+      );
+      if (commandCount > 0 && generatedCommandTools.length > 0) {
+        console.log(
+          `${commandCount} commands generated for ${generatedCommandTools
+            .map((t) => t.name)
+            .join(', ')}`
+        );
       }
🤖 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 `@src/core/init.ts` around lines 667 - 676, The output message uses toolDirs
(constructed from successfulTools.map((t) => t.skillsPath)) to report the
location of both skills and commands, but commands are not necessarily stored in
the skills directory. To fix this, build a separate set of directories
specifically for commands from the appropriate command path property (not
skillsPath), and use toolDirs only when reporting skills, and commandDirs only
when reporting commands. This ensures the output accurately reflects where each
artifact type is actually located.
🤖 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.

Inline comments:
In `@test/core/shared/skill-paths.test.ts`:
- Line 23: The test assertions in the resolveToolSkillsDir test are using
hard-coded POSIX path separators (forward slashes like /repo/app/.claude/skills)
which will fail on Windows systems. Replace all hard-coded path strings in the
expect assertions with path.join() to construct the expected paths
programmatically, ensuring the tests work across all operating systems.
Specifically, replace `/repo/app/.claude/skills` with path.join('/repo/app',
'.claude', 'skills') and apply the same pattern to other similar hard-coded
paths in related assertions.

In `@test/core/workspace/skills.test.ts`:
- Around line 59-81: The test hard-codes a POSIX path string in the expect
assertion, making it platform-sensitive and missing Windows path separator
coverage. In the test for getWorkspaceSkillDirectory function with
'minimax-code', replace the hard-coded string '/home/alex/.minimax/skills' in
the expect call with a dynamic path constructed using path.join() from the
component parts (the HOME directory and the relative path segments), so the
assertion automatically uses the correct path separators for the platform being
tested.

---

Outside diff comments:
In `@src/core/init.ts`:
- Around line 667-676: The output message uses toolDirs (constructed from
successfulTools.map((t) => t.skillsPath)) to report the location of both skills
and commands, but commands are not necessarily stored in the skills directory.
To fix this, build a separate set of directories specifically for commands from
the appropriate command path property (not skillsPath), and use toolDirs only
when reporting skills, and commandDirs only when reporting commands. This
ensures the output accurately reflects where each artifact type is actually
located.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6fb29e29-71d7-4cd0-bb4d-7c51a2d3994d

📥 Commits

Reviewing files that changed from the base of the PR and between 1b06fdd and b0faef8.

📒 Files selected for processing (34)
  • docs/cli.md
  • docs/commands.md
  • docs/supported-tools.md
  • openspec/changes/add-minimax-code-tool-support/.openspec.yaml
  • openspec/changes/add-minimax-code-tool-support/design.md
  • openspec/changes/add-minimax-code-tool-support/proposal.md
  • openspec/changes/add-minimax-code-tool-support/specs/ai-tool-paths/spec.md
  • openspec/changes/add-minimax-code-tool-support/specs/cli-init/spec.md
  • openspec/changes/add-minimax-code-tool-support/specs/cli-update/spec.md
  • openspec/changes/add-minimax-code-tool-support/specs/workspace-links/spec.md
  • openspec/changes/add-minimax-code-tool-support/tasks.md
  • src/cli/index.ts
  • src/core/available-tools.ts
  • src/core/config.ts
  • src/core/init.ts
  • src/core/migration.ts
  • src/core/profile-sync-drift.ts
  • src/core/shared/index.ts
  • src/core/shared/skill-paths.ts
  • src/core/shared/tool-detection.ts
  • src/core/update.ts
  • src/core/workspace/skills.ts
  • test/commands/config-profile.test.ts
  • test/commands/context-store.test.ts
  • test/commands/workspace.test.ts
  • test/core/available-tools.test.ts
  • test/core/context-store/registry.test.ts
  • test/core/init.test.ts
  • test/core/profile-sync-drift.test.ts
  • test/core/shared/skill-paths.test.ts
  • test/core/shared/tool-detection.test.ts
  • test/core/update.test.ts
  • test/core/workspace/skills.test.ts
  • test/helpers/temp-dir.ts

Comment thread test/core/shared/skill-paths.test.ts Outdated
Comment thread test/core/workspace/skills.test.ts Outdated

@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.

Thanks for the thorough MiniMax integration. The global skill resolver shape and test coverage are directionally good, but I found one user-facing correctness issue that should be fixed before merge.

src/core/init.ts now builds toolDirs from successfulTools.map((t) => t.skillsPath) and uses that same value for both skills and commands in the setup summary. That is wrong for adapter-backed tools because commands are generated under command-specific directories, not the skills directory, and it is especially misleading for minimax-code because command generation is skipped entirely. With delivery: both, openspec init --tools minimax-code can report something like N skills and M commands in ~/.minimax/skills/ and only later say commands were skipped. Please split the success summary so skill counts use skill paths and command counts only include tools with a command adapter and their actual command output locations, or omit the command location/count when every selected tool skipped commands.

The other broad pieces I checked look sane: resolveToolSkillsDir() consistently targets home-backed ~/.minimax/skills, update/drift/detection paths now use shared skill-capable helpers, and the workspace skill tests cover preserving global MiniMax skills during commands-only delivery. The path-separator nits in tests are worth cleaning up too, but this summary output bug is the blocking bit because it tells users OpenSpec generated artifacts that do not exist.

@showms
showms force-pushed the codex/add-minimax-code-tool-support branch from eb444bd to 4746cee Compare June 15, 2026 13:44
@showms

showms commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

@alfred-openspec Thanks for the review. I pushed a follow-up update that splits the init summary for skills and commands.

  • Skill counts now report only skill target directories.
  • Command counts only include tools with a command adapter and report the adapter’s actual output directories.
  • Adapterless tools like minimax-code no longer report command output locations; they only show the skipped-commands message.
  • Also cleaned up the path-separator-sensitive test assertions.

@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.

Reviewed the follow-up MiniMax Code changes. I checked the global skills path abstraction, commands-only preservation, no repo-local .minimax/.mavis fallback, and init/update/workspace behavior. Targeted tests pass in a temp worktree: 4 files, 115 tests. Looks good to me.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/cli.md (1)

535-535: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a language to the fenced command block.

Line 535 starts a fenced block without a language. Markdownlint reports MD040. Use text for this CLI syntax block.

Proposed fix
-```
+```text
🤖 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 `@docs/cli.md` at line 535, Update the fenced command block beginning at line
535 in the CLI documentation to specify the text language by changing its
opening fence to use text, while preserving the block contents and closing
fence.

Source: Linters/SAST tools

🤖 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.

Outside diff comments:
In `@docs/cli.md`:
- Line 535: Update the fenced command block beginning at line 535 in the CLI
documentation to specify the text language by changing its opening fence to use
text, while preserving the block contents and closing fence.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fdff6fe4-c545-4c05-ab98-4766e8f185b9

📥 Commits

Reviewing files that changed from the base of the PR and between 4746cee and d0c0f73.

📒 Files selected for processing (6)
  • .changeset/add-minimax-code-skills.md
  • docs/cli.md
  • docs/commands.md
  • docs/supported-tools.md
  • src/cli/index.ts
  • src/core/available-tools.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/commands.md
  • src/core/available-tools.ts

clay-good
clay-good previously approved these changes Aug 4, 2026

@clay-good clay-good 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.

LGTM. The refreshed diff is limited to MiniMax Code's global skills target and the shared path-resolution seam required by init/update/detection. It does not reintroduce workspace or context-store code, does not change command-generation architecture, preserves existing local-tool behavior, and restricts writes/detection to OpenSpec-managed openspec-* skills. Proof: 3,487 local tests passed; GitHub CI passed on Linux, macOS, and Windows; lint/type-check, release tracking, dependency review, security audit, and CodeRabbit all passed.

alfred-openspec
alfred-openspec previously approved these changes Aug 4, 2026

@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.

Verified the refreshed MiniMax Code integration at this exact head. The global skills path, managed-directory boundaries, commands-only preservation, init/update behavior, focused 265-test run, and hosted matrix all check out.

@clay-good
clay-good dismissed stale reviews from alfred-openspec and themself via 737d7a7 August 4, 2026 22:24

@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 (3)
test/core/update.test.ts (2)

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

Name the deletion path this test covers.

The config sets delivery: 'skills' with workflows: ['propose'], so openspec-explore is a deselected workflow. The test therefore covers removeUnselectedSkillDirs, not the commands-only removeSkillDirs path. Rename the test to state the deselected-workflow path. removeSkillDirs stays unreachable for a global target, because execute gates it on !hasGlobalSkillTarget(tool).

♻️ Proposed test name
-    it('should not delete MiniMax skills through a linked directory outside the global skills root', async () => {
+    it('should not delete deselected MiniMax skills through a linked directory outside the global skills root', async () => {
🤖 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/update.test.ts` around lines 198 - 204, Rename the test case around
the existing deletion scenario to explicitly identify the
removeUnselectedSkillDirs path and the deselected openspec-explore workflow.
Keep the test setup and assertions unchanged; do not describe it as covering the
commands-only removeSkillDirs path.

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

Consider a shared fixture helper for the four symlink-boundary tests.

The four tests cover four distinct code paths, so the coverage is not redundant. The setup repeats verbatim: mkdtemp, write the fixture skill, create the link with the win32 junction branch, and remove the directory in finally. Extract a helper that takes the link path and the fixture path and returns the outside directory. The helper keeps the win32 junction branch in one place.

🤖 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/update.test.ts` around lines 164 - 314, Extract the repeated
temporary-directory, fixture-file, symlink creation, and cleanup logic from the
four symlink-boundary tests into a shared test helper. Have the helper accept
the link path and fixture path, create the outside directory and link using the
existing Windows junction branch, and return the outside directory for cleanup.
Update each test to use the helper while preserving its distinct assertions and
configuration.
src/core/update.ts (1)

1022-1053: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider extracting the skill-write block shared with execute.

Lines 1023-1024 and 1040-1052 now duplicate the skillsDir/skillsRoot selection and the skill write from execute (lines 273-296). The containment root choice is security relevant. If the two sites diverge later, one path could write without the correct root. A shared private helper that resolves both paths and writes one skill file would keep the choice in one place.

🤖 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 `@src/core/update.ts` around lines 1022 - 1053, Extract the duplicated
skill-file writing logic from the update flow around getSkillTemplates and the
corresponding execute flow into a shared private helper. Have the helper
centralize skillsDir/skillsRoot selection, assertPathWithin containment, and
writing a single SKILL.md, then replace both call sites while preserving their
existing tool and content behavior.
🤖 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 `@src/core/update.ts`:
- Around line 1022-1053: Extract the duplicated skill-file writing logic from
the update flow around getSkillTemplates and the corresponding execute flow into
a shared private helper. Have the helper centralize skillsDir/skillsRoot
selection, assertPathWithin containment, and writing a single SKILL.md, then
replace both call sites while preserving their existing tool and content
behavior.

In `@test/core/update.test.ts`:
- Around line 198-204: Rename the test case around the existing deletion
scenario to explicitly identify the removeUnselectedSkillDirs path and the
deselected openspec-explore workflow. Keep the test setup and assertions
unchanged; do not describe it as covering the commands-only removeSkillDirs
path.
- Around line 164-314: Extract the repeated temporary-directory, fixture-file,
symlink creation, and cleanup logic from the four symlink-boundary tests into a
shared test helper. Have the helper accept the link path and fixture path,
create the outside directory and link using the existing Windows junction
branch, and return the outside directory for cleanup. Update each test to use
the helper while preserving its distinct assertions and configuration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d6e851e1-75e0-4b85-9824-5552c82c36e8

📥 Commits

Reviewing files that changed from the base of the PR and between d0c0f73 and 737d7a7.

📒 Files selected for processing (5)
  • docs/cli.md
  • src/core/init.ts
  • src/core/update.ts
  • test/core/init.test.ts
  • test/core/update.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/cli.md

@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.

Re-reviewed the current head. The previously approved MiniMax integration remains intact, and the merge resolution now confines global skill writes and removals to the selected skills root with symlink-escape regressions. A fresh build, 274 focused integration tests, and the full hosted matrix pass.

@clay-good
clay-good added this pull request to the merge queue Aug 5, 2026
Merged via the queue into Fission-AI:main with commit 161f945 Aug 5, 2026
14 checks passed
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.

3 participants