Skip to content

feat: add native support for Kurama#1371

Open
andeerc wants to merge 1 commit into
Fission-AI:mainfrom
andeerc:feat/add-kurama-adapter
Open

feat: add native support for Kurama#1371
andeerc wants to merge 1 commit into
Fission-AI:mainfrom
andeerc:feat/add-kurama-adapter

Conversation

@andeerc

@andeerc andeerc commented Jul 15, 2026

Copy link
Copy Markdown

This PR adds native support for Kurama, mapping it to the .kurama directory. It registers the adapter so openspec init works perfectly for Kurama projects.

Summary by CodeRabbit

  • New Features
    • Added Kurama as a supported AI tool.
    • Commands can now be generated as Kurama-compatible Markdown skill files.
    • Kurama output is available through the existing command-generation tool selection and registry.

Adds Kurama to AI_TOOLS mapping `.kurama` directory and registers the command adapter.
@andeerc andeerc requested a review from TabishB as a code owner July 15, 2026 20:13
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds Kurama support by implementing a command adapter, exporting and registering it, and adding Kurama to the available AI tool configuration.

Changes

Kurama integration

Layer / File(s) Summary
Kurama adapter implementation
src/core/command-generation/adapters/kurama.ts, src/core/command-generation/adapters/index.ts
Adds Kurama path generation and markdown formatting with YAML frontmatter, then re-exports the adapter.
Registry and tool wiring
src/core/command-generation/registry.ts, src/core/config.ts
Registers kuramaAdapter and adds Kurama with .kurama as its skills directory.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: tabishb

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 summarizes the main change: native Kurama support was added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages.


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: 1

🤖 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 `@src/core/command-generation/adapters/kurama.ts`:
- Around line 22-32: Update formatFile to apply the existing escapeYamlValue
helper to content.name, content.description, content.category, and every
content.tags element before interpolating or joining them. Preserve the current
frontmatter structure while ensuring all YAML values are safely escaped.
🪄 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: 06fc23d0-3708-44b9-82c6-50bb5e6ae426

📥 Commits

Reviewing files that changed from the base of the PR and between 0a99f41 and cbe1b27.

📒 Files selected for processing (4)
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/adapters/kurama.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts

Comment on lines +22 to +32
formatFile(content: CommandContent): string {
const tagsStr = content.tags.join(', ');
return `---
name: ${content.name}
description: ${content.description}
category: ${content.category}
tags: [${tagsStr}]
---

${content.body}
`;

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n "escapeYamlValue|formatFile" src/core/command-generation/adapters

Repository: Fission-AI/OpenSpec

Length of output: 5186


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in \
  src/core/command-generation/adapters/kurama.ts \
  src/core/command-generation/adapters/claude.ts \
  src/core/command-generation/adapters/cursor.ts \
  src/core/command-generation/adapters/windsurf.ts \
  src/core/command-generation/adapters/trae.ts \
  src/core/command-generation/adapters/yaml.ts \
  src/core/command-generation/adapters/yaml.js
do
  if [ -f "$f" ]; then
    echo "===== $f ====="
    wc -l "$f"
    cat -n "$f"
    echo
  fi
done

Repository: Fission-AI/OpenSpec

Length of output: 7672


🏁 Script executed:

#!/bin/bash
set -euo pipefail

ruby -v >/dev/null 2>&1 || { echo "ruby unavailable"; exit 0; }

ruby <<'RUBY'
require 'psych'

samples = [
  ["simple", "ok", "dev", ["a", "b"]],
  ["colon", "a: b", "c", ["x"]],
  ["hash", "a # b", "c", ["x"]],
  ["comma", "a,b", "c", ["x,y"]],
  ["brackets", "[a]", "c", ["x]y"]],
  ["newline", "a\nb", "c", ["x\ny"]],
]

samples.each do |name, desc, category, tags|
  yaml = <<~YAML
  ---
  name: #{name}
  description: #{desc}
  category: #{category}
  tags: [#{tags.join(', ')}]
  ---
  YAML

  begin
    doc = Psych.load(yaml)
    puts "OK #{name}: #{doc.inspect}"
  rescue => e
    puts "ERR #{name}: #{e.class}: #{e.message}"
  end
end
RUBY

Repository: Fission-AI/OpenSpec

Length of output: 766


Escape Kurama frontmatter values before interpolation.
name, description, category, and each tag need YAML escaping here; unquoted values with :, #, [], or newlines can break the generated frontmatter. Reuse the existing escapeYamlValue helper and escape tags before joining them.

🤖 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/command-generation/adapters/kurama.ts` around lines 22 - 32, Update
formatFile to apply the existing escapeYamlValue helper to content.name,
content.description, content.category, and every content.tags element before
interpolating or joining them. Preserve the current frontmatter structure while
ensuring all YAML values are safely escaped.

Source: Learnings

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.

1 participant