mirror of
https://github.com/affaan-m/ECC.git
synced 2026-08-20 06:25:43 +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
1.7 KiB
1.7 KiB
description, agent, subtask
| description | agent | subtask |
|---|---|---|
| Fix Rust build errors and borrow checker issues | rust-build-resolver | true |
Rust Build Command
Fix Rust build, clippy, and dependency errors: $ARGUMENTS
Your Task
- Run cargo check:
cargo check 2>&1 - Run cargo clippy:
cargo clippy -- -D warnings 2>&1 - Fix errors one at a time
- Verify fixes don't introduce new errors
Common Rust Errors
Borrow Checker
cannot borrow `x` as mutable because it is also borrowed as immutable
Fix: Restructure to end immutable borrow first; clone only if justified
Type Mismatch
mismatched types: expected `T`, found `U`
Fix: Add .into(), as, or explicit type conversion
Missing Import
unresolved import `crate::module`
Fix: Fix the use path or declare the module (add Cargo.toml deps only for external crates)
Lifetime Errors
does not live long enough
Fix: Use owned type or add lifetime annotation
Trait Not Implemented
the trait `X` is not implemented for `Y`
Fix: Add #[derive(Trait)] or implement manually
Fix Order
- Build errors - Code must compile
- Clippy warnings - Fix suspicious constructs
- Formatting -
cargo fmtcompliance
Build Commands
cargo check 2>&1
cargo clippy -- -D warnings 2>&1
cargo fmt --check 2>&1
cargo tree --duplicates
cargo test
Verification
After fixes:
cargo check # Should succeed
cargo clippy -- -D warnings # No warnings allowed
cargo fmt --check # Formatting should pass
cargo test # Tests should pass
IMPORTANT: Fix errors only. No refactoring, no improvements. Get the build green with minimal changes.