mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-12 20:57:59 +02:00
The `.opencode/commands/*.md` frontmatter referenced agents with the Claude Code plugin namespace (`agent: everything-claude-code:<name>`), but ECC's opencode integration registers its agents unscoped in `opencode.json`'s `agent` map (`code-reviewer`, `planner`, ...), and that file's own `command` section already references them unscoped. The `everything-claude-code:` scope resolves under no opencode config (the opencode plugin package is `ecc-universal`, and inline-config agents are bare), so subtask commands like `/code-review` hard-fail with `Agent not found: everything-claude-code:code-reviewer`. Non-subtask commands fall back to the default agent and appear to work — which is why only some commands failed. Strip the `everything-claude-code:` prefix from all 30 command frontmatter agent ids so they match the registered agents, fix the MIGRATION.md example, and replace the test that enforced the broken scoped invariant with one that asserts each command agent id is a registered opencode agent (fails on the old scoped ids, passes on the fix). Fixes #2477
89 lines
1.5 KiB
Markdown
89 lines
1.5 KiB
Markdown
---
|
||
description: Import instincts from external sources
|
||
agent: build
|
||
---
|
||
|
||
# Instinct Import Command
|
||
|
||
Import instincts from a file or URL: $ARGUMENTS
|
||
|
||
## Your Task
|
||
|
||
Import instincts into the continuous-learning-v2 system.
|
||
|
||
## Import Sources
|
||
|
||
### File Import
|
||
```
|
||
/instinct-import path/to/instincts.json
|
||
```
|
||
|
||
### URL Import
|
||
```
|
||
/instinct-import https://example.com/instincts.json
|
||
```
|
||
|
||
### Team Share Import
|
||
```
|
||
/instinct-import @teammate/instincts
|
||
```
|
||
|
||
## Import Format
|
||
|
||
Expected JSON structure:
|
||
|
||
```json
|
||
{
|
||
"instincts": [
|
||
{
|
||
"trigger": "[situation description]",
|
||
"action": "[recommended action]",
|
||
"confidence": 0.7,
|
||
"category": "coding",
|
||
"source": "imported"
|
||
}
|
||
],
|
||
"metadata": {
|
||
"version": "1.0",
|
||
"exported": "2025-01-15T10:00:00Z",
|
||
"author": "username"
|
||
}
|
||
}
|
||
```
|
||
|
||
## Import Process
|
||
|
||
1. **Validate format** - Check JSON structure
|
||
2. **Deduplicate** - Skip existing instincts
|
||
3. **Adjust confidence** - Reduce confidence for imports (×0.8)
|
||
4. **Merge** - Add to local instinct store
|
||
5. **Report** - Show import summary
|
||
|
||
## Import Report
|
||
|
||
```
|
||
Import Summary
|
||
==============
|
||
Source: [path or URL]
|
||
Total in file: X
|
||
Imported: Y
|
||
Skipped (duplicates): Z
|
||
Errors: W
|
||
|
||
Imported Instincts:
|
||
- [trigger] (confidence: 0.XX)
|
||
- [trigger] (confidence: 0.XX)
|
||
...
|
||
```
|
||
|
||
## Conflict Resolution
|
||
|
||
When importing duplicates:
|
||
- Keep higher confidence version
|
||
- Merge application counts
|
||
- Update timestamp
|
||
|
||
---
|
||
|
||
**TIP**: Review imported instincts with `/instinct-status` after import.
|