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
69 lines
1.5 KiB
Markdown
69 lines
1.5 KiB
Markdown
---
|
|
description: Review code for quality, security, and maintainability
|
|
agent: code-reviewer
|
|
subtask: true
|
|
---
|
|
|
|
# Code Review Command
|
|
|
|
Review code changes for quality, security, and maintainability: $ARGUMENTS
|
|
|
|
## Your Task
|
|
|
|
1. **Get changed files**: Run `git diff --name-only HEAD`
|
|
2. **Analyze each file** for issues
|
|
3. **Generate structured report**
|
|
4. **Provide actionable recommendations**
|
|
|
|
## Check Categories
|
|
|
|
### Security Issues (CRITICAL)
|
|
- [ ] Hardcoded credentials, API keys, tokens
|
|
- [ ] SQL injection vulnerabilities
|
|
- [ ] XSS vulnerabilities
|
|
- [ ] Missing input validation
|
|
- [ ] Insecure dependencies
|
|
- [ ] Path traversal risks
|
|
- [ ] Authentication/authorization flaws
|
|
|
|
### Code Quality (HIGH)
|
|
- [ ] Functions > 50 lines
|
|
- [ ] Files > 800 lines
|
|
- [ ] Nesting depth > 4 levels
|
|
- [ ] Missing error handling
|
|
- [ ] console.log statements
|
|
- [ ] TODO/FIXME comments
|
|
- [ ] Missing JSDoc for public APIs
|
|
|
|
### Best Practices (MEDIUM)
|
|
- [ ] Mutation patterns (use immutable instead)
|
|
- [ ] Unnecessary complexity
|
|
- [ ] Missing tests for new code
|
|
- [ ] Accessibility issues (a11y)
|
|
- [ ] Performance concerns
|
|
|
|
### Style (LOW)
|
|
- [ ] Inconsistent naming
|
|
- [ ] Missing type annotations
|
|
- [ ] Formatting issues
|
|
|
|
## Report Format
|
|
|
|
For each issue found:
|
|
|
|
```
|
|
**[SEVERITY]** file.ts:123
|
|
Issue: [Description]
|
|
Fix: [How to fix]
|
|
```
|
|
|
|
## Decision
|
|
|
|
- **CRITICAL or HIGH issues**: Block commit, require fixes
|
|
- **MEDIUM issues**: Recommend fixes before merge
|
|
- **LOW issues**: Optional improvements
|
|
|
|
---
|
|
|
|
**IMPORTANT**: Never approve code with security vulnerabilities!
|