mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-02 07:03:28 +08:00
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
This commit is contained in:
61
.opencode/commands/learn.md
Normal file
61
.opencode/commands/learn.md
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
description: Extract patterns and learnings from current session
|
||||
agent: build
|
||||
---
|
||||
|
||||
# Learn Command
|
||||
|
||||
Extract patterns, learnings, and reusable insights from the current session: $ARGUMENTS
|
||||
|
||||
## Your Task
|
||||
|
||||
Analyze the conversation and code changes to extract:
|
||||
|
||||
1. **Patterns discovered** - Recurring solutions or approaches
|
||||
2. **Best practices applied** - Techniques that worked well
|
||||
3. **Mistakes to avoid** - Issues encountered and solutions
|
||||
4. **Reusable snippets** - Code patterns worth saving
|
||||
|
||||
## Output Format
|
||||
|
||||
### Patterns Discovered
|
||||
|
||||
**Pattern: [Name]**
|
||||
- Context: When to use this pattern
|
||||
- Implementation: How to apply it
|
||||
- Example: Code snippet
|
||||
|
||||
### Best Practices Applied
|
||||
|
||||
1. [Practice name]
|
||||
- Why it works
|
||||
- When to apply
|
||||
|
||||
### Mistakes to Avoid
|
||||
|
||||
1. [Mistake description]
|
||||
- What went wrong
|
||||
- How to prevent it
|
||||
|
||||
### Suggested Skill Updates
|
||||
|
||||
If patterns are significant, suggest updates to:
|
||||
- `skills/coding-standards/SKILL.md`
|
||||
- `skills/[domain]/SKILL.md`
|
||||
- `rules/[category].md`
|
||||
|
||||
## Instinct Format (for continuous-learning-v2)
|
||||
|
||||
```json
|
||||
{
|
||||
"trigger": "[situation that triggers this learning]",
|
||||
"action": "[what to do]",
|
||||
"confidence": 0.7,
|
||||
"source": "session-extraction",
|
||||
"timestamp": "[ISO timestamp]"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**TIP**: Run `/learn` periodically during long sessions to capture insights before context compaction.
|
||||
Reference in New Issue
Block a user