mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-10-25 07:03:52 +08:00
* feat: add Easy Code as a supported AI tool - Register 'easycode' in AI_TOOLS (config.ts) with skillsDir '.easycode' - Add EasycodeAdapter (easycode.ts): generates TOML commands at .easycode/commands/opsx/<id>.toml, matching Easy Code's native format - Export easycodeAdapter from adapters/index.ts - Register easycodeAdapter in CommandAdapterRegistry Easy Code (https://easycode.ai) is a terminal-based AI coding assistant. Its commands use TOML with a description field and a prompt multiline literal string, distinct from the Markdown/YAML frontmatter format used by most other tools. Tested locally: `openspec init --tools easycode` generates 5 SKILL.md files and 5 .toml command files in the expected directory structure. * fix: robust TOML serialization for Easy Code adapter Per code review: the original formatFile had unsafe manual escaping that would corrupt output for descriptions containing backslashes or control characters, and prompt bodies containing triple-single-quotes. Changes: - Add src/core/command-generation/toml.ts with two helpers: escapeTOMLBasicString — escapes \, ", \n, \r, \t for TOML basic strings (double-quoted) escapeTOMLMultilineString — escapes \ and \r, and breaks any run of 3+ consecutive " (lookahead match) for TOML basic multiline strings - Switch prompt block from triple-single-quote literal string (''') to triple-double-quote basic multiline string ("""), which allows full escape sequence support and handles arbitrary body content - Update easycode.ts to use both helpers * fix: escape disallowed control characters in TOML helpers Per code review: TOML basic strings forbid U+0000-U+0008, U+000B-U+000C, U+000E-U+001F, and U+007F. Add escapeControlChars() helper that replaces these with \uXXXX sequences, and apply it in both escapeTOMLBasicString and escapeTOMLMultilineString after their named-escape passes. * feat(easycode): harden project skills and command integration --------- Co-authored-by: Trae <konghaifeng@cmcm.com> Co-authored-by: Clay Good <hi@claygood.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>