feat: add native support for Kurama#1371
Conversation
Adds Kurama to AI_TOOLS mapping `.kurama` directory and registers the command adapter.
📝 WalkthroughWalkthroughAdds Kurama support by implementing a command adapter, exporting and registering it, and adding Kurama to the available AI tool configuration. ChangesKurama integration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
src/core/command-generation/adapters/index.tssrc/core/command-generation/adapters/kurama.tssrc/core/command-generation/registry.tssrc/core/config.ts
| formatFile(content: CommandContent): string { | ||
| const tagsStr = content.tags.join(', '); | ||
| return `--- | ||
| name: ${content.name} | ||
| description: ${content.description} | ||
| category: ${content.category} | ||
| tags: [${tagsStr}] | ||
| --- | ||
|
|
||
| ${content.body} | ||
| `; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
rg -n "escapeYamlValue|formatFile" src/core/command-generation/adaptersRepository: 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
doneRepository: 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
RUBYRepository: 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
This PR adds native support for Kurama, mapping it to the
.kuramadirectory. It registers the adapter soopenspec initworks perfectly for Kurama projects.Summary by CodeRabbit