2026-04-07 21:41:11 +08:00
|
|
|
"""Trae IDE integration. — skills-based agent.
|
2026-04-01 09:17:21 -05:00
|
|
|
|
2026-04-07 21:41:11 +08:00
|
|
|
Trae IDE uses ``.trae/skills/speckit-<name>/SKILL.md`` layout.
|
|
|
|
|
In the Specify CLI Trae integration, explicit command support was deprecated
|
|
|
|
|
since v0.5.1; ``--skills`` defaults to ``True``.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
from ..base import IntegrationOption, SkillsIntegration
|
2026-04-01 09:17:21 -05:00
|
|
|
|
|
|
|
|
|
2026-04-07 21:41:11 +08:00
|
|
|
class TraeIntegration(SkillsIntegration):
|
|
|
|
|
"""Integration for Trae IDE."""
|
|
|
|
|
|
2026-04-01 09:17:21 -05:00
|
|
|
key = "trae"
|
|
|
|
|
config = {
|
|
|
|
|
"name": "Trae",
|
|
|
|
|
"folder": ".trae/",
|
2026-04-07 21:41:11 +08:00
|
|
|
"commands_subdir": "skills",
|
2026-04-01 09:17:21 -05:00
|
|
|
"install_url": None,
|
|
|
|
|
"requires_cli": False,
|
|
|
|
|
}
|
|
|
|
|
registrar_config = {
|
2026-04-07 21:41:11 +08:00
|
|
|
"dir": ".trae/skills",
|
2026-04-01 09:17:21 -05:00
|
|
|
"format": "markdown",
|
|
|
|
|
"args": "$ARGUMENTS",
|
2026-04-07 21:41:11 +08:00
|
|
|
"extension": "/SKILL.md",
|
2026-04-01 09:17:21 -05:00
|
|
|
}
|
2026-04-07 21:41:11 +08:00
|
|
|
context_file = ".trae/rules/project_rules.md"
|
2026-05-01 18:54:41 +02:00
|
|
|
multi_install_safe = True
|
2026-04-07 21:41:11 +08:00
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def options(cls) -> list[IntegrationOption]:
|
|
|
|
|
return [
|
|
|
|
|
IntegrationOption(
|
|
|
|
|
"--skills",
|
|
|
|
|
is_flag=True,
|
|
|
|
|
default=True,
|
|
|
|
|
help="Install as agent skills (default for trae since v0.5.1)",
|
|
|
|
|
),
|
|
|
|
|
]
|