Skip to content

Add ECA (Editor Code Assistant) harness support#2005

Open
lockie wants to merge 1 commit into
obra:devfrom
lockie:add-eca-harness
Open

Add ECA (Editor Code Assistant) harness support#2005
lockie wants to merge 1 commit into
obra:devfrom
lockie:add-eca-harness

Conversation

@lockie

@lockie lockie commented Jul 18, 2026

Copy link
Copy Markdown

Who is submitting this PR?

Field Value
Your model + version GLM-5.2 (zai-coding-plan/glm-5.2)
Harness + version ECA 0.147.3
All plugins installed superpowers (local checkout), adr, caveman, context-mode
Human partner who reviewed this diff Andrew Kravchuk (@lockie)

What problem are you trying to solve?

ECA (Editor Code Assistant) is an open-source AI pair programming tool (https://eca.dev) with a plugin system that supports skills, hooks, MCP servers, and agents. Users running ECA had no way to use Superpowers — the plugin system is compatible, but Superpowers lacked the .eca-plugin/ directory structure and hook definitions that ECA needs to discover and load the plugin.

This was experienced firsthand: after configuring Superpowers as a plugin source in ECA's config.json, the skills were not discovered and no bootstrap was injected. The using-superpowers skill content never reached the model, so no skills auto-triggered.

What does this PR change?

Adds ECA as a supported harness using the Shape A (shell-hook) pattern, the same integration shape as Cursor and Copilot CLI:

  • .eca-plugin/marketplace.json — marketplace entry for plugin discovery
  • .eca-plugin/superpowers/eca.json — plugin manifest pointing to skills
  • .eca-plugin/superpowers/hooks/hooks.jsonchatStart and postCompact hooks that run the shared hooks/session-start script
  • .eca-plugin/superpowers/hooks/session-start — symlink to the shared hooks/session-start
  • .eca-plugin/superpowers/skills — symlink to the repo-root skills/
  • skills/using-superpowers/references/eca-tools.md — ECA tool mapping
  • docs/README.eca.md — install/troubleshooting guide
  • tests/eca/ — plugin structure validation tests
  • tests/hooks/test-session-start.sh — ECA hook output test case
  • .version-bump.json — registered the ECA marketplace version
  • scripts/sync-to-codex-plugin.sh — added /.eca-plugin/ to excludes
  • README.md, SKILL.md, docs/porting-to-a-new-harness.md — documentation pointers

ECA sets no harness-specific environment variables, so the hooks/session-start script falls into the existing else branch that emits {"additionalContext": "..."} — the SDK standard format that ECA's chatStart hook honors.

The postCompact hook ensures the bootstrap is re-injected after context compaction, matching the behavior of Claude Code's compact matcher.

Is this change appropriate for the core library?

Yes. ECA is a general-purpose coding agent, not a project-specific or domain-specific tool. This adds a new harness integration using the same pattern as existing harnesses (Claude Code, Cursor, Copilot CLI, etc.). Skills, bootstrap injection, and tool mapping are general-purpose — they benefit anyone using ECA regardless of project type.

What alternatives did you consider?

  • Submitting to the eca-plugins marketplace repo only: The official eca-plugins repo at github.com/editor-code-assistant/eca-plugins has a plugin entry for superpowers, but it is skills-only (no hooks). Adding hooks there would be a separate process and wouldn't give users the full Superpowers experience (no bootstrap injection). Hosting the plugin from the Superpowers repo itself gives users the complete integration.
  • Requiring manual config in user's config.json hooks section: Could work but would require every user to manually configure the hook, which is error-prone and doesn't match the install experience of other harnesses. The .eca-plugin/ directory ships everything through the plugin install mechanism.

Does this PR contain multiple unrelated changes?

No. All changes are part of a single new-harness integration.

Existing PRs

PR #1686 was a prior attempt at this same integration by the same author. It was closed to start fresh on a clean branch based on the latest dev, incorporating all current contributor guidelines and porting requirements.

Environment tested

Harness Harness version Model Model version/ID
ECA 0.147.3 GLM-4.7 zai-coding-plan/glm-4.7

New harness support

Clean-session transcript for "Let's make a react todo list"
**User:** Let's make a react todo list

**Assistant:** I'll help you create a React todo list! Let me first check the relevant skills to ensure I approach this correctly.

*[eca__skill: Loading skill 'superpowers:using-superpowers']*

*[eca__skill: Loading skill 'superpowers:brainstorming']*

**Assistant:** Using **superpowers:brainstorming** to explore requirements before building.

*[eca__directory_tree: Listing tree: test]*

*[eca__read_file: Reading README.md]*

**Assistant:** I can see you're starting with an empty workspace. Let me ask some questions to understand exactly what you're looking for.

**What's the primary purpose of this todo list?**

A. A simple learning project to understand React basics
B. A functional todo app you'll actually use to track tasks
C. A demonstration/showcase piece to display React skills
D. Something else?

The brainstorming skill auto-triggers before any code is written, confirming the bootstrap injection works.

Evaluation

  • Initial prompt: "Let's make a react todo list"
  • Eval sessions: 2 (initial plugin setup + debugging hooks.json format, then clean verification session)
  • Outcomes: brainstorming skill auto-triggers correctly at session start via chatStart hook. The model loads using-superpowers, then loads brainstorming, announces it, and enters the brainstorming flow (asking clarifying questions) before writing any code.

Rigor

  • This change was tested adversarially, not just on the happy path
  • I did not modify carefully-tuned content (Red Flags table, rationalizations, "human partner" language) without extensive evals showing the change is an improvement

No skills content was modified. Only infrastructure files were added/changed: plugin directory structure, hook definitions, tool mapping reference, documentation, and tests. The one-line addition to SKILL.md's Platform Adaptation section is a pointer entry (explicitly permitted by the porting guide as the sole allowed SKILL.md edit for a port).

Human review

  • A human has reviewed the COMPLETE proposed diff before submission

The complete diff was reviewed by Andrew Kravchuk before submission. The plugin was installed locally and tested in a live ECA session.

🤖 Generated with ECA (zai-coding-plan/glm-5.2)

Added .eca-plugin/ directory with marketplace.json, plugin manifest,
chatStart + postCompact hooks that inject the using-superpowers bootstrap
at session start and after compaction, and symlinks to the shared skills
and session-start script. Added ECA tool mapping reference, install docs,
hook test case, plugin structure tests, and registered the version in
.version-bump.json.

🤖 Generated with [ECA](https://eca.dev) (zai-coding-plan/glm-5.2)

Co-Authored-By: eca-agent <git@eca.dev>
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