opencode-cc10x 6.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +283 -0
- package/bun.lock +20 -0
- package/dist/agents.d.ts +3 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +483 -0
- package/dist/agents.js.map +1 -0
- package/dist/compatibility-layer.d.ts +18 -0
- package/dist/compatibility-layer.d.ts.map +1 -0
- package/dist/compatibility-layer.js +150 -0
- package/dist/compatibility-layer.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1459 -0
- package/dist/index.js.map +1 -0
- package/dist/intent-detection.d.ts +14 -0
- package/dist/intent-detection.d.ts.map +1 -0
- package/dist/intent-detection.js +121 -0
- package/dist/intent-detection.js.map +1 -0
- package/dist/memory.d.ts +41 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +330 -0
- package/dist/memory.js.map +1 -0
- package/dist/router.d.ts +15 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +208 -0
- package/dist/router.js.map +1 -0
- package/dist/skills.d.ts +3 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +2790 -0
- package/dist/skills.js.map +1 -0
- package/dist/task-orchestrator.d.ts +46 -0
- package/dist/task-orchestrator.d.ts.map +1 -0
- package/dist/task-orchestrator.js +262 -0
- package/dist/task-orchestrator.js.map +1 -0
- package/dist/workflow-executor.d.ts +29 -0
- package/dist/workflow-executor.d.ts.map +1 -0
- package/dist/workflow-executor.js +414 -0
- package/dist/workflow-executor.js.map +1 -0
- package/install-from-github.mjs +152 -0
- package/install-from-github.sh +106 -0
- package/install.sh +295 -0
- package/opencode.json +118 -0
- package/package.json +41 -0
- package/tsconfig.json +23 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 OpenHands & original cc10x authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# OpenCode cc10x Plugin
|
|
2
|
+
|
|
3
|
+
**The Intelligent Orchestrator for OpenCode**
|
|
4
|
+
|
|
5
|
+
A complete port of the cc10x orchestration system from Claude Code to OpenCode, providing intelligent workflow automation, TDD enforcement, and multi-agent coordination.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Automatic Intent Detection** - Router automatically detects BUILD, DEBUG, REVIEW, or PLAN intents
|
|
10
|
+
- **6 Specialized Agents** - Component builder, bug investigator, code reviewer, silent failure hunter, integration verifier, planner
|
|
11
|
+
- **12 Supporting Skills** - Session memory, TDD enforcement, code generation, debugging patterns, and more
|
|
12
|
+
- **Task-Based Orchestration** - Uses OpenCode's Task system for coordinated multi-agent workflows
|
|
13
|
+
- **Memory Persistence** - Survives context compaction with .claude/cc10x/ memory bank
|
|
14
|
+
- **Parallel Execution** - Code reviewer and silent failure hunter run simultaneously
|
|
15
|
+
- **Confidence Scoring** - 80%+ threshold for issue reporting
|
|
16
|
+
- **TDD Enforcement** - RED → GREEN → REFACTOR cycle with exit code verification
|
|
17
|
+
|
|
18
|
+
## Architecture
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
USER REQUEST
|
|
22
|
+
│
|
|
23
|
+
▼
|
|
24
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
25
|
+
│ cc10x-router (OpenCode Plugin) │
|
|
26
|
+
│ ├─ Intent Detection │
|
|
27
|
+
│ ├─ Memory Loading (.claude/cc10x/) │
|
|
28
|
+
│ ├─ Task Hierarchy Creation │
|
|
29
|
+
│ └─ Workflow Orchestration │
|
|
30
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
31
|
+
│
|
|
32
|
+
├─ BUILD → component-builder → [code-reviewer ∥ silent-failure-hunter] → integration-verifier
|
|
33
|
+
├─ DEBUG → bug-investigator → code-reviewer → integration-verifier
|
|
34
|
+
├─ REVIEW → code-reviewer
|
|
35
|
+
└─ PLAN → planner
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
### Prerequisites
|
|
41
|
+
- OpenCode installed and configured
|
|
42
|
+
- Node.js/Bun available for plugin dependencies
|
|
43
|
+
|
|
44
|
+
### Steps
|
|
45
|
+
|
|
46
|
+
1. **Add the plugin to your OpenCode configuration:**
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"$schema": "https://opencode.ai/config.json",
|
|
51
|
+
"plugin": ["opencode-cc10x"]
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2. **Install the plugin (single command, no clone):**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
curl -fsSL https://raw.githubusercontent.com/Chaim12345/cc10x/main/project/opencode-cc10x-plugin/install-from-github.mjs | node
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Windows (PowerShell):
|
|
62
|
+
|
|
63
|
+
```powershell
|
|
64
|
+
irm https://raw.githubusercontent.com/Chaim12345/cc10x/main/project/opencode-cc10x-plugin/install-from-github.mjs | node
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
3. **Alternative package-manager install (public npm):**
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm add @chaim12345/opencode-cc10x
|
|
71
|
+
bun add @chaim12345/opencode-cc10x
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If you are testing locally before publishing, install from a tarball:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm pack
|
|
78
|
+
npm add ./opencode-cc10x-<version>.tgz
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
4. **Set up cc10x memory directory:**
|
|
82
|
+
|
|
83
|
+
The plugin will automatically create `.claude/cc10x/` on first use.
|
|
84
|
+
|
|
85
|
+
5. **Configure agents (optional):**
|
|
86
|
+
|
|
87
|
+
The plugin automatically configures the necessary agents. You can customize them in your `opencode.json`:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"agent": {
|
|
92
|
+
"component-builder": {
|
|
93
|
+
"color": "green",
|
|
94
|
+
"temperature": 0.3
|
|
95
|
+
},
|
|
96
|
+
"code-reviewer": {
|
|
97
|
+
"color": "yellow",
|
|
98
|
+
"temperature": 0.1
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Usage
|
|
105
|
+
|
|
106
|
+
Once installed, cc10x automatically activates for development tasks:
|
|
107
|
+
|
|
108
|
+
- **"Build a user authentication system"** → Triggers BUILD workflow
|
|
109
|
+
- **"Debug the payment error"** → Triggers DEBUG workflow
|
|
110
|
+
- **"Review this PR for security issues"** → Triggers REVIEW workflow
|
|
111
|
+
- **"Plan the database schema"** → Triggers PLAN workflow
|
|
112
|
+
|
|
113
|
+
The router handles all orchestration automatically - no manual skill selection needed.
|
|
114
|
+
|
|
115
|
+
## Configuration
|
|
116
|
+
|
|
117
|
+
### Agent Customization
|
|
118
|
+
|
|
119
|
+
All cc10x agents can be configured in `opencode.json`:
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"agent": {
|
|
124
|
+
"component-builder": {
|
|
125
|
+
"description": "Builds features using TDD",
|
|
126
|
+
"model": "anthropic/claude-sonnet-4-20250514",
|
|
127
|
+
"temperature": 0.3,
|
|
128
|
+
"tools": {
|
|
129
|
+
"write": true,
|
|
130
|
+
"edit": true,
|
|
131
|
+
"bash": true
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Permissions
|
|
139
|
+
|
|
140
|
+
The plugin requires these permissions for proper operation:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"permission": {
|
|
145
|
+
"bash": {
|
|
146
|
+
"mkdir *": "allow",
|
|
147
|
+
"git *": "allow"
|
|
148
|
+
},
|
|
149
|
+
"edit": "allow",
|
|
150
|
+
"write": "allow"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Skill Permissions
|
|
156
|
+
|
|
157
|
+
cc10x skills are automatically loaded. Control access with:
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"permission": {
|
|
162
|
+
"skill": {
|
|
163
|
+
"cc10x:*": "allow"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Memory System
|
|
170
|
+
|
|
171
|
+
cc10x uses `.claude/cc10x/` for persistent memory:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
.claude/cc10x/
|
|
175
|
+
├── activeContext.md # Current focus, decisions, learnings
|
|
176
|
+
├── patterns.md # Project conventions, common gotchas
|
|
177
|
+
└── progress.md # Completed work, verification evidence
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
This memory survives context compaction and enables:
|
|
181
|
+
- Continuity across sessions
|
|
182
|
+
- Pattern learning and reuse
|
|
183
|
+
- Resumable workflows
|
|
184
|
+
- Decision tracking
|
|
185
|
+
|
|
186
|
+
## Workflows
|
|
187
|
+
|
|
188
|
+
### BUILD Workflow
|
|
189
|
+
1. **component-builder** - Implements feature with TDD
|
|
190
|
+
2. **code-reviewer** + **silent-failure-hunter** (parallel) - Quality and edge case analysis
|
|
191
|
+
3. **integration-verifier** - End-to-end validation
|
|
192
|
+
|
|
193
|
+
### DEBUG Workflow
|
|
194
|
+
1. **bug-investigator** - Log-first investigation
|
|
195
|
+
2. **code-reviewer** - Fix validation
|
|
196
|
+
3. **integration-verifier** - Verification
|
|
197
|
+
|
|
198
|
+
### REVIEW Workflow
|
|
199
|
+
1. **code-reviewer** - Comprehensive code analysis with 80%+ confidence
|
|
200
|
+
|
|
201
|
+
### PLAN Workflow
|
|
202
|
+
1. **planner** - Creates detailed plans with research
|
|
203
|
+
|
|
204
|
+
## Development
|
|
205
|
+
|
|
206
|
+
### Building the Plugin
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
cd opencode-cc10x-plugin
|
|
210
|
+
bun install
|
|
211
|
+
bun build
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Testing
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Run plugin tests
|
|
218
|
+
bun test
|
|
219
|
+
|
|
220
|
+
# Test with OpenCode
|
|
221
|
+
opencode --plugin ./dist/
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Compatibility
|
|
225
|
+
|
|
226
|
+
- **OpenCode Version**: 0.8.0+
|
|
227
|
+
- **Node.js**: 18+
|
|
228
|
+
- **Bun**: 1.0+
|
|
229
|
+
|
|
230
|
+
## Migration from Claude Code
|
|
231
|
+
|
|
232
|
+
If you're migrating from Claude Code:
|
|
233
|
+
|
|
234
|
+
1. Install this plugin in OpenCode
|
|
235
|
+
2. Copy your existing `.claude/cc10x/` memory files to the project root
|
|
236
|
+
3. The plugin will automatically use your existing memory
|
|
237
|
+
4. All cc10x workflows will work identically
|
|
238
|
+
|
|
239
|
+
## Differences from Claude Code
|
|
240
|
+
|
|
241
|
+
| Aspect | Claude Code | OpenCode cc10x |
|
|
242
|
+
|--------|-------------|----------------|
|
|
243
|
+
| Plugin Format | Marketplace plugin | npm package + OpenCode plugin |
|
|
244
|
+
| Agent System | Custom agent framework | OpenCode native agents |
|
|
245
|
+
| Task System | Claude Code Tasks | OpenCode Task tool |
|
|
246
|
+
| Memory | .claude/cc10x/ | Same location, adapted APIs |
|
|
247
|
+
| Skills | Claude skills | OpenCode skills with compatibility layer |
|
|
248
|
+
|
|
249
|
+
## Troubleshooting
|
|
250
|
+
|
|
251
|
+
### Plugin not loading
|
|
252
|
+
- Check OpenCode version compatibility
|
|
253
|
+
- Verify plugin is in `opencode.json` plugins list
|
|
254
|
+
- Check `~/.config/opencode/plugins/` for installation
|
|
255
|
+
|
|
256
|
+
### Agents not available
|
|
257
|
+
- Run `opencode agent list` to see available agents
|
|
258
|
+
- Check agent configuration in `opencode.json`
|
|
259
|
+
- Restart OpenCode after plugin installation
|
|
260
|
+
|
|
261
|
+
### Memory issues
|
|
262
|
+
- Ensure `.claude/cc10x/` directory exists and is writable
|
|
263
|
+
- Check file permissions
|
|
264
|
+
- Plugin will auto-create missing files with templates
|
|
265
|
+
|
|
266
|
+
## Contributing
|
|
267
|
+
|
|
268
|
+
This is a faithful port of cc10x. For issues or enhancements:
|
|
269
|
+
|
|
270
|
+
1. Check existing issues
|
|
271
|
+
2. Ensure compatibility with both Claude Code and OpenCode patterns
|
|
272
|
+
3. Maintain the core cc10x principles and workflows
|
|
273
|
+
4. Test with both simple and complex development tasks
|
|
274
|
+
|
|
275
|
+
## License
|
|
276
|
+
|
|
277
|
+
MIT - Same as original cc10x
|
|
278
|
+
|
|
279
|
+
## Acknowledgments
|
|
280
|
+
|
|
281
|
+
- Original cc10x by romiluz13
|
|
282
|
+
- OpenCode team for the excellent plugin system
|
|
283
|
+
- Claude Code team for the orchestration patterns
|
package/bun.lock
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockfileVersion": 1,
|
|
3
|
+
"configVersion": 1,
|
|
4
|
+
"workspaces": {
|
|
5
|
+
"": {
|
|
6
|
+
"name": "opencode-cc10x",
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@types/node": "^20.0.0",
|
|
9
|
+
"typescript": "^5.0.0",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
"packages": {
|
|
14
|
+
"@types/node": ["@types/node@20.19.33", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-Rs1bVAIdBs5gbTIKza/tgpMuG1k3U/UMJLWecIMxNdJFDMzcM5LOiLVRYh3PilWEYDIeUDv7bpiHPLPsbydGcw=="],
|
|
15
|
+
|
|
16
|
+
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
17
|
+
|
|
18
|
+
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dist/agents.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAie7C,CAAC"}
|