Skip to content

feat(easycode): add project skills and commands - #1352

Merged
clay-good merged 7 commits into
Fission-AI:mainfrom
redknox:add-easycode-tool
Sep 29, 2026
Merged

clay-good merged 7 commits into
Fission-AI:mainfrom
redknox:add-easycode-tool

Conversation

@redknox

@redknox redknox commented Jul 13, 2026 •

Copy link
Copy Markdown

Status

LGTM locally. The PR is conflict-free and mergeable. Fresh CI and Security runs are waiting for a maintainer to approve execution for this fork PR; maintainer code review is also required.

What was missing / the motivation

OrionStarAI/EasyCode users could not install or refresh OpenSpec workflows through openspec init and openspec update.

What it does

  • Adds easycode to tool selection and detection.
  • Writes skills to .easycode/skills/openspec-*/SKILL.md.
  • Writes TOML commands to .easycode/commands/opsx/<id>.toml, invoked as /opsx:<id>.
  • Supports core and custom profiles plus skills, commands, and both delivery modes.
  • Repairs stale or missing generated files and prunes deselected OpenSpec artifacts while preserving unrelated user files.
  • Extracts Gemini's existing TOML escaping into a shared helper without changing Gemini output.
  • Documents EasyCode in docs-lab/reference/supported-tools.md and adds a minor changeset.

Proof it works

  • Verified the integration contract against EasyCode's command loader and skill loader.
  • 1,570 focused generation, detection, init, and update tests pass across 7 files.
  • Build and TypeScript compilation pass.
  • ESLint passes.
  • Changesets reports a minor @fission-ai/openspec release.
  • Docs claim tests pass.
  • The ordinary full run completed 5,977 of 5,981 tests. Two environment-sensitive failures passed with an isolated home directory. The remaining two are unchanged completion-tip tests that depend on host shell-completion detection; this PR does not touch that code. Fresh GitHub CI is pending fork-run approval.

Notes / nits

  • Security review found no dependency, workflow, credential, network, subprocess, or executable-code additions. The integration writes local text files through existing OpenSpec paths.
  • Legacy docs/ remains unchanged. The support entry uses the current docs-lab format.
  • No authenticated EasyCode session was exercised.

Summary by CodeRabbit

  • New Features
    • Added EasyCode support for project setup and updates, including project-local skills and TOML command files invoked with /opsx:<id>.
  • Documentation
    • Updated the supported-tools guide with EasyCode’s skills location, command location, and invocation formats.

- 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.
@redknox
redknox requested a review from TabishB as a code owner July 13, 2026 05:49
@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Fission-AI/OpenSpec/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f4c5706b-e851-435c-af49-5e536ba1b522

📥 Commits

Reviewing files that changed from the base of the PR and between dbd72b2 and ffd0663.

📒 Files selected for processing (10)
  • docs-lab/reference/supported-tools.md
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts
  • test/core/available-tools.test.ts
  • test/core/command-generation/adapters.test.ts
  • test/core/command-generation/registry.test.ts
  • test/core/init.test.ts
  • test/core/shared/tool-detection.test.ts
  • test/core/update.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Easy Code as a supported tool. It registers a command adapter that writes TOML files under .easycode/commands/opsx/, shares TOML escaping with the Gemini adapter, and adds coverage and documentation for detection, invocation, initialization, and updates.

Changes

Easy Code support

Layer / File(s) Summary
TOML command formatting
src/core/command-generation/toml.ts, src/core/command-generation/adapters/easycode.ts, src/core/command-generation/adapters/gemini.ts, test/core/command-generation/adapters.test.ts, test/core/command-generation/registry.test.ts
Adds shared TOML escaping and the Easy Code adapter. Adapter tests cover TOML parsing, escaping, generated workflows, and command paths.
Tool configuration and registration
src/core/config.ts, src/core/command-generation/adapters/index.ts, src/core/command-generation/registry.ts, test/core/command-generation/invocation.test.ts, test/core/available-tools.test.ts, test/core/shared/tool-detection.test.ts, docs-lab/reference/supported-tools.md, .changeset/easycode-tool-support.md
Adds Easy Code to tool configuration and adapter registration. Updates detection and invocation tests, support documentation, and the changeset.
Initialization and update behavior
test/core/init.test.ts, test/core/update.test.ts
Adds coverage for Easy Code command generation, delivery modes, custom profiles, update repair, and synchronization.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to ffd06

This adds EasyCode support to init and update, with TOML commands generated under .easycode/commands/opsx/. No concrete merge-blocking issue was identified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to ffd06

The new integration writes commands and skills within a project using the existing generation flow. No new privileged or cross-service path was established, but the behavior and authority of the EasyCode client that consumes these files remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The independently affected write scope is the invoking project's generated EasyCode files. The inspected registration and write path does not demonstrate access to another tenant, service, data store, credential, or deployment environment.

Trust Boundaries and Controls

  • observed — An existing .easycode directory can make EasyCode available for tool selection. That directory signal does not itself execute a command; generated command writes use the registered adapter and project-path checks.

Resilience and Maintainability Implications

  • inferred — If deletion of a deselected EasyCode command fails, its file can remain after reconciliation. Whether the external client would continue exposing that file is not established by the available source.

Hardening Proposals

  • proposed — Verify the EasyCode client's loading, execution, and permission behavior for generated project files, including what happens when a deselected command file remains after failed cleanup.
🚥 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 identifies the main change: adding EasyCode project skills and commands.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 13 files. (1 skipped: 1…
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 a new PR

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/easycode.ts`:
- Around line 23-25: Update formatFile to serialize both description and body
with TOML-safe encoding that preserves arbitrary content, including backslashes
and control characters in description and triple single quotes in the prompt
body. Replace the manual escaping and vulnerable literal construction with the
project’s existing TOML serializer if available, and add coverage for all three
cases.
🪄 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: e6d23291-6e2c-4e6c-996b-6237e0fb710c

📥 Commits

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

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

Comment thread src/core/command-generation/adapters/easycode.ts Outdated
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

@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/toml.ts`:
- Around line 18-25: Update both TOML escaping functions, including
escapeTOMLBasicString and its multiline counterpart, to replace every remaining
disallowed control character with a TOML \uXXXX escape. Preserve existing
backslash, quote, newline, carriage-return, and tab handling, while covering
U+0000–U+0008, U+000B–U+000C, U+000E–U+001F, and U+007F according to each string
mode’s allowed characters.
🪄 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: 2363f698-df0b-4038-a8be-406ee3219017

📥 Commits

Reviewing files that changed from the base of the PR and between 15563ec and b943f36.

📒 Files selected for processing (2)
  • src/core/command-generation/adapters/easycode.ts
  • src/core/command-generation/toml.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/core/command-generation/adapters/easycode.ts

Comment thread src/core/command-generation/toml.ts Outdated
Trae and others added 3 commits July 13, 2026 14:09
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.
…d326

# Conflicts:
#	src/core/command-generation/adapters/index.ts
#	src/core/config.ts
@clay-good
clay-good requested a review from a team as a code owner August 27, 2026 21:38
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@clay-good clay-good changed the title feat: add Easy Code as a supported AI tool feat(easycode): add project skills and commands Aug 27, 2026

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The EasyCode command path, TOML loader format, argument behavior, escaping, skills path, and preservation tests match the current upstream implementation. Non-blocking nit: docs/cli.md's supported tool ID list should also add easycode so its claim that it mirrors AI_TOOLS stays true.

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed current head 89d4609. EasyCode command and skill paths match the upstream loaders, namespaced command invocation follows the nested TOML path, and the shared TOML serializer preserves Gemini behavior while covering hostile inputs. Full CI is green. The docs-lab change still requires final review from @TabishB.

Brings in the batch that just landed on main and resolves the conflicts
with it, keeping both sides' changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-approved at ffd0663. The current-main merge preserves EasyCode's skill and namespaced TOML command paths, shared TOML escaping, lifecycle behavior, and upstream-compatible invocation. CI is green. Final review of the docs-lab change by @TabishB is still required.

@clay-good
clay-good added this pull request to the merge queue Sep 29, 2026
Merged via the queue into Fission-AI:main with commit d1642cb Sep 29, 2026
14 checks passed
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.

3 participants