Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .eca-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"plugins": [
{
"name": "superpowers",
"description": "Agentic development methodology: spec-driven brainstorming, structured planning, subagent-driven development, TDD, and systematic debugging",
"source": ".eca-plugin/superpowers",
"category": "Workflow",
"tags": ["methodology", "skill", "planning", "tdd", "debugging", "subagent", "workflow"],
"author": "obra",
"icon": "⚡",
"featured": true
}
]
}
5 changes: 5 additions & 0 deletions .eca-plugin/superpowers/eca.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"skills": [
{"path": "skills"}
]
}
22 changes: 22 additions & 0 deletions .eca-plugin/superpowers/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"superpowers-bootstrap": {
"type": "chatStart",
"visible": false,
"actions": [
{
"type": "shell",
"file": "${plugin:root}/hooks/session-start"
}
]
},
"superpowers-bootstrap-compact": {
"type": "postCompact",
"visible": false,
"actions": [
{
"type": "shell",
"file": "${plugin:root}/hooks/session-start"
}
]
}
}
1 change: 1 addition & 0 deletions .eca-plugin/superpowers/hooks/session-start
1 change: 1 addition & 0 deletions .eca-plugin/superpowers/skills
3 changes: 2 additions & 1 deletion .version-bump.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
{ "path": ".codex-plugin/plugin.json", "field": "version" },
{ "path": ".kimi-plugin/plugin.json", "field": "version" },
{ "path": ".claude-plugin/marketplace.json", "field": "plugins.0.version" },
{ "path": "gemini-extension.json", "field": "version" }
{ "path": "gemini-extension.json", "field": "version" },
{ "path": ".eca-plugin/marketplace.json", "field": "plugins.0.version" }
],
"audit": {
"exclude": [
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If this sounds like someone you know, definitely send them our way.

## Quickstart

Give your agent Superpowers: [Claude Code](#claude-code), [Antigravity](#antigravity), [Codex App](#codex-app), [Codex CLI](#codex-cli), [Cursor](#cursor), [Factory Droid](#factory-droid), [Gemini CLI](#gemini-cli), [GitHub Copilot CLI](#github-copilot-cli), [Kimi Code](#kimi-code), [OpenCode](#opencode), [Pi](#pi).
Give your agent Superpowers: [Claude Code](#claude-code), [Antigravity](#antigravity), [Codex App](#codex-app), [Codex CLI](#codex-cli), [Cursor](#cursor), [Factory Droid](#factory-droid), [Gemini CLI](#gemini-cli), [GitHub Copilot CLI](#github-copilot-cli), [Kimi Code](#kimi-code), [OpenCode](#opencode), [Pi](#pi), [ECA](#eca).

## How it works

Expand Down Expand Up @@ -199,6 +199,23 @@ pi -e /path/to/superpowers

The Pi package loads the Superpowers skills and a small extension that injects the `using-superpowers` bootstrap at session startup and again after compaction. Pi has native skills, so no compatibility `Skill` tool is required. Subagent and task-list tools remain optional Pi companion packages.

### ECA

Add Superpowers as a plugin source in `~/.config/eca/config.json` (or `.eca/config.json` for project-local):

```json
{
"plugins": {
"superpowers-source": {
"source": "https://github.com/obra/superpowers.git"
},
"install": ["superpowers"]
}
}
```

Restart ECA. Detailed docs: [docs/README.eca.md](docs/README.eca.md)

## The Basic Workflow

1. **brainstorming** - Activates before writing code. Refines rough ideas through questions, explores alternatives, presents design in sections for validation. Saves design document.
Expand Down
105 changes: 105 additions & 0 deletions docs/README.eca.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Superpowers for ECA (Editor Code Assistant)

Complete guide for using Superpowers with [ECA](https://eca.dev).

## Installation

Add Superpowers as a plugin source in your ECA config:

**Global config** (`~/.config/eca/config.json`):

```json
{
"plugins": {
"superpowers-source": {
"source": "https://github.com/obra/superpowers.git"
},
"install": ["superpowers"]
}
}
```

**Project-local config** (`.eca/config.json`):

```json
{
"plugins": {
"superpowers-source": {
"source": "https://github.com/obra/superpowers.git"
},
"install": ["superpowers"]
}
}
```

ECA's runtime plugin loader matches install entries against marketplace entries by exact name. The plugin marketplace entry is named `superpowers`, so the install list must say `"superpowers"` — not `"superpowers@source-name"`. The `@source` suffix is only parsed by the `/plugin-install` command, not by the loader that resolves plugins on session start.

Restart ECA for the plugin to take effect.

Verify by sending:

> Tell me about your superpowers

### Updating

ECA re-resolves plugin sources on startup and periodically (approximately hourly). To force an update, restart ECA or clear the plugin cache at `~/.eca/cache/plugins/`.

To pin a specific version, use a branch or tag in the source URL:

```json
{
"plugins": {
"superpowers-source": {
"source": "https://github.com/obra/superpowers.git#v5.1.0"
},
"install": ["superpowers"]
}
}
```

## How It Works

The plugin provides three things:

1. **Skills** — All Superpowers skills are registered under the `superpowers:` namespace. ECA discovers them via the plugin's `skills/` directory (symlinked to the project's `skills/` root).
2. **Bootstrap injection** — A `chatStart` hook runs the `session-start` script, which injects the `using-superpowers` skill content as additional context at the start of every chat.
3. **Tool mapping** — The `using-superpowers` skill references `references/eca-tools.md` for ECA-specific tool name equivalents.

### Skill Namespacing

ECA plugins expose skills under a `<plugin-name>:<name>` namespace. Superpowers skills are accessed as:

- `superpowers:brainstorming`
- `superpowers:test-driven-development`
- `superpowers:systematic-debugging`
- `superpowers:using-superpowers`
- etc.

When the plugin name matches the skill name (as with `using-superpowers`), the qualified form `superpowers:using-superpowers` and the bare form `using-superpowers` both resolve.

To manually invoke a skill:

```
Load the superpowers:brainstorming skill
```

## Troubleshooting

### Plugin not loading

1. Check that your `config.json` has the correct `source` URL.
2. Verify the git repo is accessible: `git ls-remote https://github.com/obra/superpowers.git`
3. Check ECA logs for plugin resolution errors.

### Skills not found

1. Use `/plugins` to verify `superpowers` appears in the plugin list.
2. Confirm the `skills` symlink inside `.eca-plugin/superpowers/` resolves to the repo's `skills/` directory.

### Bootstrap not appearing

The `chatStart` hook runs `hooks/session-start`, which reads `skills/using-superpowers/SKILL.md` and injects it as `additionalContext`. If the bootstrap is missing:

1. Check that the `session-start` symlink resolves to the repo-root `hooks/session-start` script.
2. Confirm the hook is registered in `.eca-plugin/superpowers/hooks/hooks.json` with `"type": "chatStart"`.
3. Start a new session — hooks fire on chat start, not mid-session.
1 change: 1 addition & 0 deletions docs/porting-to-a-new-harness.md
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ Use this as the live index; when in doubt, read the files, not this table.
| Kimi Code | `.kimi-plugin/plugin.json` | manifest `sessionStart.skill` loads `using-superpowers` | inline `skillInstructions` in manifest | `tests/kimi/` | marketplace or `/plugins install` GitHub URL |
| OpenCode | `.opencode/plugins/superpowers.js` (declared via root `package.json` `main`) | in-process: `config` hook registers skills dir; `experimental.chat.messages.transform` injects user message | inline in `superpowers.js` | `tests/opencode/` | `opencode.json` plugin git URL |
| pi | `.pi/extensions/superpowers.ts` | in-process: `resources_discover` registers skills; `context` event injects user message; lifecycle-flag + compaction-aware | `piToolMapping()` inline **and** `references/pi-tools.md` | `tests/pi/` | repo-root `package.json` fields |
| ECA | `.eca-plugin/marketplace.json` + `.eca-plugin/superpowers/eca.json` | shell hook → `hooks/session-start` (`additionalContext`); `chatStart` + `postCompact` hooks | `references/eca-tools.md` | `tests/hooks/`, `tests/eca/` | plugin source (git URL or local path) |

## Appendix B — Gotchas that have bitten porters

Expand Down
3 changes: 2 additions & 1 deletion hooks/session-start
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ elif [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -z "${COPILOT_CLI:-}" ]; then
# Claude Code sets CLAUDE_PLUGIN_ROOT without COPILOT_CLI
printf '{\n "hookSpecificOutput": {\n "hookEventName": "SessionStart",\n "additionalContext": "%s"\n }\n}\n' "$session_context" | cat
else
# Copilot CLI (sets COPILOT_CLI=1) or unknown platform — SDK standard format
# Copilot CLI (sets COPILOT_CLI=1), ECA (no harness env vars), or unknown
# platform — SDK standard format
printf '{\n "additionalContext": "%s"\n}\n' "$session_context" | cat
fi

Expand Down
1 change: 1 addition & 0 deletions scripts/sync-to-codex-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ EXCLUDES=(
"/.claude-plugin/"
"/.codex/"
"/.cursor-plugin/"
"/.eca-plugin/"
"/.git/"
"/.gitattributes"
"/.github/"
Expand Down
1 change: 1 addition & 0 deletions skills/using-superpowers/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ If your harness appears here, read its reference file for special instructions:
- Codex: `references/codex-tools.md`
- Pi: `references/pi-tools.md`
- Antigravity: `references/antigravity-tools.md`
- ECA: `references/eca-tools.md`

## User Instructions

Expand Down
44 changes: 44 additions & 0 deletions skills/using-superpowers/references/eca-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ECA Tool Mapping

Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On ECA (Editor Code Assistant) these resolve to the tools below.

| Action skills request | ECA equivalent |
|----------------------|----------------|
| Read a file | `eca__read_file` |
| Create / overwrite a file | `eca__write_file` |
| Edit a file (targeted replace) | `eca__edit_file` |
| Move / rename a file | `eca__move_file` |
| Run a shell command | `eca__shell_command` |
| Search file contents | `eca__grep` |
| List directory tree | `eca__directory_tree` |
| Task tracking ("create a todo", "mark complete") | `eca__task` |
| Invoke a skill | `eca__skill` |
| Check editor diagnostics | `eca__editor_diagnostics` |
| Git operations | `eca__git` |
| Fetch a URL / web search | `eca__shell_command` (use `curl`/`wget`) |

## Subagent support

ECA supports subagents via the `eca__spawn_agent` tool. Available agent types:

- `general` — General-purpose agent for complex multi-step tasks and research.
- `explorer` — Codebase search specialist for finding and reading file contents.

When a skill says to dispatch a named agent type, use `eca__spawn_agent` with the appropriate agent and a detailed task prompt:

| Skill instruction | ECA equivalent |
|-------------------|----------------|
| `Task tool (superpowers:implementer)` | `eca__spawn_agent(agent: "general", task: "<filled implementer-prompt.md>")` |
| `Task tool (superpowers:spec-reviewer)` | `eca__spawn_agent(agent: "general", task: "<filled spec-reviewer-prompt.md>")` |
| `Task tool (superpowers:code-reviewer)` | `eca__spawn_agent(agent: "general", task: "<filled code-reviewer.md>")` |
| `Task tool (superpowers:code-quality-reviewer)` | `eca__spawn_agent(agent: "general", task: "<filled code-quality-reviewer-prompt.md>")` |
| `Task tool (general-purpose)` with inline prompt | `eca__spawn_agent(agent: "general", task: "<inline prompt>")` |
| `Task tool (explorer)` | `eca__spawn_agent(agent: "explorer", task: "<exploration task>")` |

### Prompt filling

Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders and pass the complete prompt as the `task` argument to `eca__spawn_agent`.

### Parallel dispatch

ECA supports parallel subagent dispatch. When a skill asks you to dispatch multiple independent subagent tasks in parallel, issue the `eca__spawn_agent` calls together. Keep dependent tasks sequential.
7 changes: 7 additions & 0 deletions tests/eca/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

echo "Running ECA plugin structure tests..."
bash "$SCRIPT_DIR/test-plugin-structure.sh"
Loading