Files
everything-claude-code/.opencode/commands/evolve.md
Affaan Mustafa 6d440c036d feat: complete OpenCode plugin support with hooks, tools, and commands
Major OpenCode integration overhaul:

- llms.txt: Comprehensive OpenCode documentation for LLMs (642 lines)
- .opencode/plugins/ecc-hooks.ts: All Claude Code hooks translated to OpenCode's plugin system
- .opencode/tools/*.ts: 3 custom tools (run-tests, check-coverage, security-audit)
- .opencode/commands/*.md: All 24 commands in OpenCode format
- .opencode/package.json: npm package structure for opencode-ecc
- .opencode/index.ts: Main plugin entry point

- Delete incorrect LIMITATIONS.md (hooks ARE supported via plugins)
- Rewrite MIGRATION.md with correct hook event mapping
- Update README.md OpenCode section to show full feature parity

OpenCode has 20+ events vs Claude Code's 3 phases:
- PreToolUse → tool.execute.before
- PostToolUse → tool.execute.after
- Stop → session.idle
- SessionStart → session.created
- SessionEnd → session.deleted
- Plus: file.edited, file.watcher.updated, permission.asked, todo.updated

- 12 agents: Full parity
- 24 commands: Full parity (+1 from original 23)
- 16 skills: Full parity
- Hooks: OpenCode has MORE (20+ events vs 3 phases)
- Custom Tools: 3 native OpenCode tools

The OpenCode configuration can now be:
1. Used directly: cd everything-claude-code && opencode
2. Installed via npm: npm install opencode-ecc
2026-02-05 05:14:33 -08:00

2.2 KiB

description, agent
description agent
Cluster instincts into skills build

Evolve Command

Cluster related instincts into structured skills: $ARGUMENTS

Your Task

Analyze instincts and promote clusters to skills.

Evolution Process

Step 1: Analyze Instincts

Group instincts by:

  • Trigger similarity
  • Action patterns
  • Category tags
  • Confidence levels

Step 2: Identify Clusters

Cluster: Error Handling
├── Instinct: Catch specific errors (0.85)
├── Instinct: Wrap errors with context (0.82)
├── Instinct: Log errors with stack trace (0.78)
└── Instinct: Return meaningful error messages (0.80)

Step 3: Generate Skill

When cluster has:

  • 3+ instincts
  • Average confidence > 0.75
  • Cohesive theme

Generate SKILL.md:

# Error Handling Skill

## Overview
Patterns for robust error handling learned from session observations.

## Patterns

### 1. Catch Specific Errors
**Trigger**: When catching errors with generic catch
**Action**: Use specific error types

### 2. Wrap Errors with Context
**Trigger**: When re-throwing errors
**Action**: Add context with fmt.Errorf or Error.cause

### 3. Log with Stack Trace
**Trigger**: When logging errors
**Action**: Include stack trace for debugging

### 4. Meaningful Messages
**Trigger**: When returning errors to users
**Action**: Provide actionable error messages

Step 4: Archive Instincts

Move evolved instincts to archived/ with reference to skill.

Evolution Report

Evolution Summary
=================

Clusters Found: X

Cluster 1: Error Handling
- Instincts: 5
- Avg Confidence: 0.82
- Status: ✅ Promoted to skill

Cluster 2: Testing Patterns
- Instincts: 3
- Avg Confidence: 0.71
- Status: ⏳ Needs more confidence

Cluster 3: Git Workflow
- Instincts: 2
- Avg Confidence: 0.88
- Status: ⏳ Needs more instincts

Skills Created:
- skills/error-handling/SKILL.md

Instincts Archived: 5
Remaining Instincts: 12

Thresholds

Metric Threshold
Min instincts per cluster 3
Min average confidence 0.75
Min cluster cohesion 0.6

TIP: Run /evolve periodically to graduate instincts to skills as confidence grows.