Skip to content

Conversation

@moe1214
Copy link

@moe1214 moe1214 commented Jan 27, 2026

Summary

  • Add Trae to AI_TOOLS with skillsDir .trae (Skill-only)
  • Keep init message logic unchanged; Trae generates skills only
  • Align docs: Trae uses skill-name commands (/openspec-new-change, /openspec-apply-change)

Details

  • src/core/config.ts: add Trae tool
  • src/core/init.ts: unchanged message path; commands skipped for Trae (no adapter)
  • docs/supported-tools.md: Trae commands location clarified as .trae/skills/ (via /openspec-*)
  • docs/commands.md: add Trae syntax row and troubleshooting note for .trae/skills/

Notes

  • No command adapter introduced for Trae to minimize code changes.
  • Behavior verified locally: openspec init --tools trae creates .trae/skills only and shows the default message.

Summary by CodeRabbit

  • New Features

    • Trae is now available as a supported AI tool option with commands /openspec-new-change and /openspec-apply-change.
  • Documentation

    • Updated tool directory reference, available tool IDs, and setup guides to reflect Trae integration.

✏️ Tip: You can customize this high-level summary in your review settings.

@moe1214 moe1214 requested a review from TabishB as a code owner January 27, 2026 09:14
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

Adds Trae as a new AI tool to the system by registering it in the configuration file and documenting it in command and tool reference guides. The tool is configured with directory .trae/ and associated command syntax patterns.

Changes

Cohort / File(s) Summary
Documentation Updates
docs/commands.md, docs/supported-tools.md
Added Trae to command tool mappings and supported tools reference with syntax /openspec-new-change, /openspec-apply-change, and skills location .trae/skills/. Updated available tool IDs and Non-Interactive Setup examples to include trae.
Configuration
src/core/config.ts
Added new AI tool option entry to exported AI_TOOLS array with properties: name: 'Trae', value: 'trae', available: true, successLabel: 'Trae', skillsDir: '.trae'.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • PR #217: Adds CodeBuddy as a new AI tool entry to the same AI_TOOLS array in src/core/config.ts, following an identical pattern.
  • PR #240: Adds Costrict as a new AI tool entry to the AI_TOOLS array, demonstrating the same integration pattern.

Suggested reviewers

  • TabishB

Poem

🐰 A new tool hops into sight,
Trae joins the ranks with delight,
Configuration set with care,
Documented everywhere!
The warren grows more bright ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and accurately describes the main changes: adding Trae as a skill-only tool and updating documentation. It is concise, specific, and clearly conveys the primary objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@greptile-apps
Copy link

greptile-apps bot commented Jan 27, 2026

Greptile Overview

Greptile Summary

This PR adds Trae as a skill-only tool to OpenSpec, which creates Agent Skills in .trae/skills/ without generating command adapters. The implementation follows existing patterns consistently across code and documentation.

Key Changes

  • Added Trae to AI_TOOLS array with skillsDir: '.trae' (src/core/config.ts:41)
  • Skills generate correctly via existing generateSkillsAndCommands method - when no adapter exists, commands are skipped and tool added to commandsSkipped list (src/core/init.ts:44-52)
  • Documentation clarified that Trae uses skill-name commands (/openspec-new-change, /openspec-apply-change) instead of OPSX syntax
  • Tool directory table and troubleshooting updated to reference .trae/skills/ location

Implementation Notes

The skill-only approach is intentional and well-executed. Since no command adapter is registered for Trae in CommandAdapterRegistry, the init logic correctly skips command generation and reports "Commands skipped for: trae (no adapter)" to the user. The 10 standard OpenSpec skills are still created in .trae/skills/, allowing Trae users to invoke them by skill name.

Confidence Score: 5/5

  • This PR is safe to merge with no risk - it follows established patterns and is well-documented
  • Score reflects minimal code changes that strictly follow existing patterns, comprehensive documentation updates, and a clear design decision (skill-only support). The implementation correctly handles the absence of a command adapter, and the user experience is properly documented.
  • No files require special attention

Important Files Changed

Filename Overview
src/core/config.ts Added Trae to AI_TOOLS array with .trae skillsDir - straightforward addition following existing pattern
src/core/init.ts Large refactor with imports reorganization; Trae handled correctly via command adapter registry (no adapter = commands skipped as intended)
docs/commands.md Simplified doc with Trae command syntax added to table; troubleshooting updated to reference .trae/skills/ directory
docs/supported-tools.md Added Trae to tool directory table and tool IDs list; documented skill-only approach with /openspec-* command pattern

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as OpenSpec CLI
    participant Config as config.ts
    participant Init as InitCommand
    participant Registry as CommandAdapterRegistry
    participant FS as FileSystem

    User->>CLI: openspec init --tools trae
    CLI->>Init: execute(projectPath)
    Init->>Config: Load AI_TOOLS
    Config-->>Init: Returns tools including Trae
    
    Init->>Init: Validate Trae tool selection
    Note over Init: Trae found with skillsDir: '.trae'
    
    Init->>FS: Create .trae/skills/ directories
    loop For each skill (10 total)
        Init->>FS: Write .trae/skills/openspec-{skill}/SKILL.md
        Note over FS: Skills: explore, new-change, continue-change,<br/>apply-change, ff-change, sync-specs,<br/>archive-change, bulk-archive-change,<br/>verify-change, onboard
    end
    
    Init->>Registry: CommandAdapterRegistry.get('trae')
    Registry-->>Init: undefined (no adapter)
    Note over Init: Commands skipped for Trae<br/>(Skill-only mode)
    
    Init->>User: Setup complete<br/>Skills in .trae/skills/<br/>Commands skipped (no adapter)<br/>Use /openspec-* syntax
Loading

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/core/init.ts`:
- Line 15: Remove the editorial placeholder comment on line 15 in
src/core/init.ts — delete the PR-note style comment (the stray
editorial/placeholder text) so the module top-level/init function or module
header contains only production-ready comments; ensure no other leftover
editorial notes or TODOs remain in the same file.

src/core/init.ts Outdated
// SKILL & COMMAND GENERATION
// ═══════════════════════════════════════════════════════════

// ... elided for brevity in this push: no functional changes beyond Trae inclusion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove the editorial placeholder comment.

Line 15 reads like a PR note and doesn’t belong in production source.

🧹 Proposed fix
-  // ... elided for brevity in this push: no functional changes beyond Trae inclusion
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// ... elided for brevity in this push: no functional changes beyond Trae inclusion
🤖 Prompt for AI Agents
In `@src/core/init.ts` at line 15, Remove the editorial placeholder comment on
line 15 in src/core/init.ts — delete the PR-note style comment (the stray
editorial/placeholder text) so the module top-level/init function or module
header contains only production-ready comments; ensure no other leftover
editorial notes or TODOs remain in the same file.

@moe1214 moe1214 marked this pull request as draft January 27, 2026 09:30
@moe1214 moe1214 closed this Jan 27, 2026
@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

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