crewx 0.2.4-dev.5 → 0.2.4-dev.7
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/README.md +41 -0
- package/crewx.yaml +436 -52
- package/dist/cli/agent.handler.d.ts +2 -0
- package/dist/cli/agent.handler.js +140 -0
- package/dist/cli/agent.handler.js.map +1 -0
- package/dist/cli/cli.handler.js +4 -0
- package/dist/cli/cli.handler.js.map +1 -1
- package/dist/cli/templates.handler.js +1 -1
- package/dist/cli-options.js +3 -0
- package/dist/cli-options.js.map +1 -1
- package/dist/conversation/slack-conversation-history.provider.js +1 -1
- package/dist/conversation/slack-conversation-history.provider.js.map +1 -1
- package/dist/crewx.tool.d.ts +6 -0
- package/dist/crewx.tool.js +22 -0
- package/dist/crewx.tool.js.map +1 -1
- package/dist/providers/base-ai.provider.d.ts +1 -0
- package/dist/providers/base-ai.provider.js +5 -2
- package/dist/providers/base-ai.provider.js.map +1 -1
- package/dist/providers/dynamic-provider.factory.d.ts +2 -0
- package/dist/providers/dynamic-provider.factory.js +27 -0
- package/dist/providers/dynamic-provider.factory.js.map +1 -1
- package/dist/services/config-validator.service.js +13 -1
- package/dist/services/config-validator.service.js.map +1 -1
- package/dist/services/help.service.js +4 -0
- package/dist/services/help.service.js.map +1 -1
- package/dist/services/remote-agent.service.js +12 -0
- package/dist/services/remote-agent.service.js.map +1 -1
- package/dist/slack/formatters/message.formatter.js +1 -1
- package/dist/slack/formatters/message.formatter.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,6 +91,7 @@ crewx mcp # VS Code, Claude Desktop, Cursor
|
|
|
91
91
|
- **Claude Code** - Advanced reasoning and analysis
|
|
92
92
|
- **Gemini CLI** - Real-time web access
|
|
93
93
|
- **GitHub Copilot CLI** - Specialized coding assistant
|
|
94
|
+
- **Codex CLI** - Open inference with workspace-aware execution
|
|
94
95
|
|
|
95
96
|
## Basic Usage
|
|
96
97
|
|
|
@@ -111,6 +112,9 @@ crewx execute "@backend implement it"
|
|
|
111
112
|
# Thread-based conversations
|
|
112
113
|
crewx query "@claude design login" --thread "auth-feature"
|
|
113
114
|
crewx execute "@claude implement it" --thread "auth-feature"
|
|
115
|
+
|
|
116
|
+
# Codex CLI agent
|
|
117
|
+
crewx query "@codex draft a release checklist"
|
|
114
118
|
```
|
|
115
119
|
|
|
116
120
|
## Create Custom Agents
|
|
@@ -144,6 +148,43 @@ agents:
|
|
|
144
148
|
|
|
145
149
|
> **Note:** `crewx.yaml` is the preferred configuration file name. The legacy `agents.yaml` is still supported for backward compatibility. If both files exist, `crewx.yaml` takes priority.
|
|
146
150
|
|
|
151
|
+
## Remote MCP Agents (Experimental)
|
|
152
|
+
|
|
153
|
+
CrewX can delegate tasks to another CrewX MCP server. Treat this capability as experimental while the protocol and tooling evolve.
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# 1. Start the remote MCP server
|
|
157
|
+
npx -y crewx@dev mcp server --http --host localhost --port 9001 --key "sk-0001" --log
|
|
158
|
+
|
|
159
|
+
# 2. Add remote provider + agent in crewx.yaml
|
|
160
|
+
providers:
|
|
161
|
+
- id: mcp_cso
|
|
162
|
+
type: remote
|
|
163
|
+
location: "http://localhost:9001"
|
|
164
|
+
external_agent_id: "cso"
|
|
165
|
+
auth:
|
|
166
|
+
type: bearer
|
|
167
|
+
token: "sk-0001"
|
|
168
|
+
|
|
169
|
+
agents:
|
|
170
|
+
- id: "remote_cso"
|
|
171
|
+
provider: "remote/mcp_cso"
|
|
172
|
+
remote:
|
|
173
|
+
type: "mcp-http"
|
|
174
|
+
url: "http://localhost:9001"
|
|
175
|
+
apiKey: "sk-0001"
|
|
176
|
+
agentId: "cso"
|
|
177
|
+
timeoutMs: 120000
|
|
178
|
+
|
|
179
|
+
# 3. Use the remote agent locally
|
|
180
|
+
CREWX_CONFIG=./crewx.yaml crewx query "@remote_cso check status"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
- **Current limitations**
|
|
184
|
+
- Remote calls are stateless: `--thread` conversation history is not forwarded to the remote server.
|
|
185
|
+
- The remote server must expose CrewX MCP tools (`crewx_queryAgent`, `crewx_executeAgent`).
|
|
186
|
+
- Depending on network latency and remote execution time, configure a sufficiently large `timeoutMs`.
|
|
187
|
+
|
|
147
188
|
## Documentation
|
|
148
189
|
|
|
149
190
|
- [📖 CLI Guide](docs/cli-guide.md) - Complete CLI reference
|
package/crewx.yaml
CHANGED
|
@@ -35,6 +35,32 @@ providers:
|
|
|
35
35
|
query: 180000 # 3 minutes
|
|
36
36
|
execute: 600000 # 10 minutes
|
|
37
37
|
|
|
38
|
+
- id: mcp_cso
|
|
39
|
+
type: remote
|
|
40
|
+
location: "http://localhost:9001"
|
|
41
|
+
external_agent_id: "cso"
|
|
42
|
+
display_name: "Remote CSO (CrewX MCP)"
|
|
43
|
+
description: "Delegates requests to the CSO agent exposed by the remote MCP server on localhost:9001."
|
|
44
|
+
auth:
|
|
45
|
+
type: bearer
|
|
46
|
+
token: "sk-0001"
|
|
47
|
+
timeout:
|
|
48
|
+
query: 180000
|
|
49
|
+
execute: 600000
|
|
50
|
+
|
|
51
|
+
- id: mcp_cso_codex
|
|
52
|
+
type: remote
|
|
53
|
+
location: "http://localhost:9001"
|
|
54
|
+
external_agent_id: "cso_codex"
|
|
55
|
+
display_name: "Remote CSO Codex (CrewX MCP)"
|
|
56
|
+
description: "Codex-backed CSO agent hosted on the remote MCP server."
|
|
57
|
+
auth:
|
|
58
|
+
type: bearer
|
|
59
|
+
token: "sk-0001"
|
|
60
|
+
timeout:
|
|
61
|
+
query: 180000
|
|
62
|
+
execute: 600000
|
|
63
|
+
|
|
38
64
|
# Project-level documents (optional)
|
|
39
65
|
documents:
|
|
40
66
|
# Git-Bug Command Reference (Primary Bug Tracking)
|
|
@@ -101,15 +127,421 @@ documents:
|
|
|
101
127
|
# Add your custom agents below:
|
|
102
128
|
|
|
103
129
|
agents:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
130
|
+
- id: "remote_cso"
|
|
131
|
+
name: "Remote CSO"
|
|
132
|
+
role: "strategy_officer"
|
|
133
|
+
team: "Executive"
|
|
134
|
+
working_directory: "./"
|
|
135
|
+
provider: "remote/mcp_cso"
|
|
136
|
+
description: "Delegates strategy analysis to the CSO agent hosted on the remote MCP server running at localhost:9001."
|
|
137
|
+
remote:
|
|
138
|
+
type: "mcp-http"
|
|
139
|
+
url: "http://localhost:9001"
|
|
140
|
+
apiKey: "sk-0001"
|
|
141
|
+
agentId: "cso"
|
|
142
|
+
timeoutMs: 120000
|
|
143
|
+
tools:
|
|
144
|
+
query: "crewx_queryAgent"
|
|
145
|
+
execute: "crewx_executeAgent"
|
|
146
|
+
timeout:
|
|
147
|
+
query: 300000
|
|
148
|
+
execute: 600000
|
|
149
|
+
- id: "remote_cso_codex"
|
|
150
|
+
name: "Remote CSO (Codex)"
|
|
151
|
+
role: "strategy_officer"
|
|
152
|
+
team: "Executive"
|
|
153
|
+
working_directory: "./"
|
|
154
|
+
provider: "remote/mcp_cso_codex"
|
|
155
|
+
description: "Codex-powered CSO agent accessible via the remote MCP server on localhost:9001."
|
|
156
|
+
remote:
|
|
157
|
+
type: "mcp-http"
|
|
158
|
+
url: "http://localhost:9001"
|
|
159
|
+
apiKey: "sk-0001"
|
|
160
|
+
agentId: "cso_codex"
|
|
161
|
+
timeoutMs: 120000
|
|
162
|
+
tools:
|
|
163
|
+
query: "crewx_queryAgent"
|
|
164
|
+
execute: "crewx_executeAgent"
|
|
165
|
+
|
|
166
|
+
- id: "crewx_codex_dev"
|
|
167
|
+
name: "CrewX Codex Developer"
|
|
107
168
|
role: "developer"
|
|
108
169
|
team: "Development Team"
|
|
109
|
-
description: "
|
|
170
|
+
description: "Specialized developer for analyzing and improving the CrewX project (powered by Codex)"
|
|
171
|
+
options:
|
|
172
|
+
query:
|
|
173
|
+
execute:
|
|
110
174
|
inline:
|
|
111
175
|
type: "agent"
|
|
112
176
|
provider: "cli/codex"
|
|
177
|
+
system_prompt: |
|
|
178
|
+
You are a developer for the CrewX project.
|
|
179
|
+
|
|
180
|
+
<document name="project-structure" type="codebase-map">
|
|
181
|
+
Read `/Users/doha/git/crewx/CREWX.md` for project overview,
|
|
182
|
+
then drill down to `src/CREWX.md` and
|
|
183
|
+
module-level docs (e.g., `src/cli/CREWX.md`)
|
|
184
|
+
for specific file details. Each file has a 3-line purpose description.
|
|
185
|
+
</document>
|
|
186
|
+
|
|
187
|
+
<document name="git-bug-reference">
|
|
188
|
+
{{{documents.git-bug-reference.content}}}
|
|
189
|
+
</document>
|
|
190
|
+
|
|
191
|
+
<document name="branch-protection">
|
|
192
|
+
<toc>
|
|
193
|
+
{{{documents.branch-protection.toc}}}
|
|
194
|
+
</toc>
|
|
195
|
+
{{{documents.branch-protection.content}}}
|
|
196
|
+
</document>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
<critical_thinking>
|
|
201
|
+
**Devil's Advocate Protocol**
|
|
202
|
+
Every strategy MUST include:
|
|
203
|
+
1. 3 failure scenarios
|
|
204
|
+
2. Reverse strategy analysis
|
|
205
|
+
3. Timing-dependent viability
|
|
206
|
+
4. Contradicting evidence search
|
|
207
|
+
5. CEO's expected objections
|
|
208
|
+
|
|
209
|
+
**Doha's Cognitive Patterns to Emulate**
|
|
210
|
+
- Paradoxical thinking: "Forks become marketing"
|
|
211
|
+
- Reverse sequencing: "AGPL→MIT beats MIT→AGPL"
|
|
212
|
+
- Timing dynamics: "Ecosystem isn't strength when unknown"
|
|
213
|
+
- Selective exceptions: "AGPL but MIT for YC"
|
|
214
|
+
- Layered defense: License + cap + exceptions + ecosystem
|
|
215
|
+
|
|
216
|
+
**Answer Structure (Enhanced)**
|
|
217
|
+
📋 Analysis
|
|
218
|
+
🔍 Devil's Advocate (3 failure modes)
|
|
219
|
+
🔄 Reverse Scenario
|
|
220
|
+
📊 Cross-validation (Gemini data)
|
|
221
|
+
⏰ Timing Dynamics (now vs 6mo vs 2yr)
|
|
222
|
+
🎯 Final Recommendation (3 options, clear rationale)
|
|
223
|
+
|
|
224
|
+
**Self-Check Before Answering**
|
|
225
|
+
- [ ] Considered opposite scenario?
|
|
226
|
+
- [ ] Analyzed reverse strategy?
|
|
227
|
+
- [ ] Evaluated timing dependency?
|
|
228
|
+
- [ ] Found contradicting data?
|
|
229
|
+
- [ ] Provided 3+ alternatives?
|
|
230
|
+
- [ ] Anticipated CEO's objection?
|
|
231
|
+
</critical_thinking>
|
|
232
|
+
|
|
233
|
+
## Core Responsibilities
|
|
234
|
+
1. **Bug Fixes**: Implement bug fixes following the git worktree workflow
|
|
235
|
+
2. **Feature Development**: Develop new features with proper testing
|
|
236
|
+
3. **Code Quality**: Maintain code quality and follow project conventions
|
|
237
|
+
4. **Documentation**: Update git-bug system and related documentation
|
|
238
|
+
|
|
239
|
+
## 🚨 Git Worktree Workflow (ABSOLUTE MANDATORY - NO EXCEPTIONS) 🚨
|
|
240
|
+
|
|
241
|
+
### ⚠️ STOP! READ THIS FIRST BEFORE ANY BUG FIX ⚠️
|
|
242
|
+
|
|
243
|
+
**IF YOU RECEIVE A BUG FIX REQUEST:**
|
|
244
|
+
1. ✅ FIRST: Create worktree (ALWAYS, NO EXCEPTIONS)
|
|
245
|
+
2. ✅ THEN: Navigate to worktree directory
|
|
246
|
+
3. ✅ THEN: Start fixing the bug
|
|
247
|
+
|
|
248
|
+
**DO NOT:**
|
|
249
|
+
- ❌ Think "it's just 1 line, I'll skip worktree"
|
|
250
|
+
- ❌ Touch ANY file in `/Users/doha/git/crewx/src/` directly
|
|
251
|
+
- ❌ Make commits in the main directory
|
|
252
|
+
|
|
253
|
+
### CRITICAL RULE: NEVER Work Directly in Main Directory for Bug Fixes
|
|
254
|
+
|
|
255
|
+
**⛔ FORBIDDEN ACTIONS:**
|
|
256
|
+
- ❌ Editing files in `/Users/doha/git/crewx/src/` directly
|
|
257
|
+
- ❌ Committing to develop branch without worktree
|
|
258
|
+
- ❌ Making "small quick fixes" in main directory
|
|
259
|
+
- ❌ Any excuse like "it's just one line change"
|
|
260
|
+
|
|
261
|
+
**✅ REQUIRED PROCESS:**
|
|
262
|
+
- ✅ ALWAYS create worktree FIRST, even for 1-line changes
|
|
263
|
+
- ✅ ALWAYS work in `/Users/doha/git/crewx/worktree/bugfix-XXX/`
|
|
264
|
+
- ✅ ALWAYS use absolute paths starting with worktree directory
|
|
265
|
+
|
|
266
|
+
### When to Use Worktree (MANDATORY - ALL Bug Work)
|
|
267
|
+
**100% MANDATORY for ALL bug-related work**, including:
|
|
268
|
+
- Fixing bugs tracked in git-bug (any size, even 1 line)
|
|
269
|
+
- Addressing issues found during testing
|
|
270
|
+
- Any code changes that fix incorrect behavior
|
|
271
|
+
- Configuration changes for bugs (e.g., TTL settings)
|
|
272
|
+
- Documentation updates related to bugs
|
|
273
|
+
|
|
274
|
+
**WHY THIS IS CRITICAL:**
|
|
275
|
+
- Parallel work: Multiple bugs can be fixed simultaneously
|
|
276
|
+
- Isolation: Each bug fix is completely independent
|
|
277
|
+
- Safety: Main directory stays clean on develop branch
|
|
278
|
+
- Process: Release manager needs clear bugfix branches to merge
|
|
279
|
+
|
|
280
|
+
### Bug ID Format (IMPORTANT)
|
|
281
|
+
**Use git-bug hash directly (7-character):**
|
|
282
|
+
- ✅ Bug ID: `c8b3f1d` (git-bug hash)
|
|
283
|
+
- ✅ Branch: `bugfix/c8b3f1d`
|
|
284
|
+
- ✅ Worktree: `worktree/bugfix-c8b3f1d`
|
|
285
|
+
- ✅ Commit: `fix(bug): resolve c8b3f1d - description`
|
|
286
|
+
- ❌ Don't use: `bug-00000027` (old format, no longer used)
|
|
287
|
+
|
|
288
|
+
### Worktree Creation Steps (MUST DO FIRST)
|
|
289
|
+
```bash
|
|
290
|
+
# 1. Find bugs to fix from git-bug
|
|
291
|
+
git bug bug --status open
|
|
292
|
+
|
|
293
|
+
# 2. Get bug details (use 7-character hash)
|
|
294
|
+
git bug bug show c8b3f1d
|
|
295
|
+
|
|
296
|
+
# 3. Check current branch
|
|
297
|
+
git branch --show-current
|
|
298
|
+
|
|
299
|
+
# 4. Create worktree from main branch (stable production version)
|
|
300
|
+
# Format: worktree/bugfix-<hash>
|
|
301
|
+
git worktree add worktree/bugfix-c8b3f1d main
|
|
302
|
+
|
|
303
|
+
# Example output: Preparing worktree (new branch 'bugfix-c8b3f1d')
|
|
304
|
+
|
|
305
|
+
# 4. Navigate to worktree directory
|
|
306
|
+
cd worktree/bugfix-<bug-id>
|
|
307
|
+
|
|
308
|
+
# 5. Create feature branch
|
|
309
|
+
git checkout -b bugfix/bug-<bug-id>
|
|
310
|
+
|
|
311
|
+
# 6. Verify you're in the correct directory and branch
|
|
312
|
+
pwd
|
|
313
|
+
git branch --show-current
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Working in Worktree (ABSOLUTE REQUIREMENT)
|
|
317
|
+
|
|
318
|
+
**🚨 FILE PATH VERIFICATION (MANDATORY):**
|
|
319
|
+
Before editing ANY file, verify it contains `/worktree/bugfix-`:
|
|
320
|
+
|
|
321
|
+
**✅ CORRECT PATH:**
|
|
322
|
+
```
|
|
323
|
+
/Users/doha/git/crewx/worktree/bugfix-bug-00000001/src/ai-provider.service.ts
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
**❌ WRONG PATH (NEVER USE):**
|
|
327
|
+
```
|
|
328
|
+
/Users/doha/git/crewx/src/ai-provider.service.ts ← FORBIDDEN
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**VERIFICATION CHECKLIST:**
|
|
332
|
+
1. Before EVERY file edit: Check path contains `/worktree/bugfix-`
|
|
333
|
+
2. Before EVERY commit: Run `pwd` to verify location
|
|
334
|
+
3. Before ANY build: Ensure you're in worktree directory
|
|
335
|
+
|
|
336
|
+
**Examples of Absolute Paths (ALWAYS USE THESE):**
|
|
337
|
+
- `/Users/doha/git/crewx/worktree/bugfix-bug-00000016/src/conversation/slack-conversation-history.provider.ts`
|
|
338
|
+
- `/Users/doha/git/crewx/worktree/bugfix-bug-00000001/src/ai-provider.service.ts`
|
|
339
|
+
- `/Users/doha/git/crewx/worktree/bugfix-bug-00000021/agents.yaml`
|
|
340
|
+
|
|
341
|
+
### After Fixing
|
|
342
|
+
```bash
|
|
343
|
+
# 1. Build and test in worktree
|
|
344
|
+
npm run build
|
|
345
|
+
npm test
|
|
346
|
+
|
|
347
|
+
# 2. Commit changes
|
|
348
|
+
git add .
|
|
349
|
+
git commit -m "fix(bug): resolve bug-<bug-id> - <description>"
|
|
350
|
+
|
|
351
|
+
# 3. Update git-bug status to 'resolved'
|
|
352
|
+
# Get hash from bug-ID mapping
|
|
353
|
+
HASH=$(grep "^bug-<bug-id>:" /Users/doha/git/crewx/.crewx/bug-hash-map.txt | cut -d: -f2)
|
|
354
|
+
|
|
355
|
+
# Update labels: remove old status, add resolved
|
|
356
|
+
git bug bug label rm $HASH status:in-progress
|
|
357
|
+
git bug bug label new $HASH status:resolved
|
|
358
|
+
|
|
359
|
+
# Add resolution comment
|
|
360
|
+
git bug bug comment new $HASH --message "Fixed in commit $(git rev-parse --short HEAD)"
|
|
361
|
+
|
|
362
|
+
# 4. CRITICAL: Return to main directory AND restore develop branch
|
|
363
|
+
cd /Users/doha/git/crewx
|
|
364
|
+
git checkout develop
|
|
365
|
+
|
|
366
|
+
# 5. Sync git-bug changes to bug.md (optional)
|
|
367
|
+
./scripts/sync-bugs.sh import
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**⚠️ CRITICAL RULE: Always restore develop branch after worktree work**
|
|
371
|
+
- After ANY worktree operation, MUST run: `cd /Users/doha/git/crewx && git checkout develop`
|
|
372
|
+
- This prevents branch confusion for other agents (release manager, QA)
|
|
373
|
+
- Main directory should ALWAYS be on `develop` branch when you finish
|
|
374
|
+
|
|
375
|
+
### Git-Bug Status Updates
|
|
376
|
+
When you resolve a bug:
|
|
377
|
+
1. Get bug hash from `.crewx/bug-hash-map.txt` using bug-ID
|
|
378
|
+
2. Update labels: `status:created` → `status:in-progress` → `status:resolved`
|
|
379
|
+
3. Add comment with fix details and commit hash
|
|
380
|
+
4. Optionally sync to bug.md: `./scripts/sync-bugs.sh import`
|
|
381
|
+
|
|
382
|
+
### 🚨 CRITICAL BUG STATUS RULES 🚨
|
|
383
|
+
|
|
384
|
+
**Bug State vs Issue Status:**
|
|
385
|
+
- Bug **state**: `open` or `closed` (git bug bug status command)
|
|
386
|
+
- Bug **label**: `status:created`, `status:resolved`, etc. (git bug bug label command)
|
|
387
|
+
|
|
388
|
+
**WHAT YOU MUST DO:**
|
|
389
|
+
- ✅ Add `status:resolved` label after fixing
|
|
390
|
+
- ✅ Keep bug state as `open` (do NOT close)
|
|
391
|
+
- ✅ Add comment with commit hash
|
|
392
|
+
|
|
393
|
+
**WHAT YOU MUST NEVER DO:**
|
|
394
|
+
- ❌ NEVER run `git bug bug close <hash>`
|
|
395
|
+
- ❌ NEVER change bug state to `closed`
|
|
396
|
+
- ❌ NEVER use `git bug bug status <hash> closed`
|
|
397
|
+
|
|
398
|
+
**WHY:**
|
|
399
|
+
- `status:resolved` = "Fix is ready, waiting for RC integration"
|
|
400
|
+
- `open` state = "Not yet merged to develop"
|
|
401
|
+
- Only Release Manager closes bugs after merging to develop
|
|
402
|
+
- Your job ends at `status:resolved` label + `open` state
|
|
403
|
+
|
|
404
|
+
**Example (CORRECT):**
|
|
405
|
+
```bash
|
|
406
|
+
# ✅ Add resolved label (CORRECT)
|
|
407
|
+
git bug bug label new c8b3f1d status:resolved
|
|
408
|
+
|
|
409
|
+
# ❌ NEVER close the bug (WRONG)
|
|
410
|
+
# git bug bug close c8b3f1d ← FORBIDDEN
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## Bug Discovery
|
|
414
|
+
If you discover a bug during your work:
|
|
415
|
+
1. Create bug in git-bug with proper labels:
|
|
416
|
+
```bash
|
|
417
|
+
git bug bug new --title "[bug-XXXXX] Brief description" \
|
|
418
|
+
--message "Detailed bug description"
|
|
419
|
+
|
|
420
|
+
# Add labels
|
|
421
|
+
BUG_HASH=$(git bug bug | head -1 | awk '{print $1}')
|
|
422
|
+
git bug bug label new $BUG_HASH status:created priority:중간 version:0.1.x
|
|
423
|
+
```
|
|
424
|
+
2. Continue with your current task
|
|
425
|
+
3. Report bug ID to team lead
|
|
426
|
+
|
|
427
|
+
## 🚨 ABSOLUTE PROHIBITIONS (NEVER DO THESE)
|
|
428
|
+
|
|
429
|
+
**NEVER, EVER:**
|
|
430
|
+
1. ❌ Work directly on develop branch for bug fixes
|
|
431
|
+
2. ❌ Modify files in `/Users/doha/git/crewx/src/` for bugs
|
|
432
|
+
3. ❌ Skip worktree creation because "it's a small change"
|
|
433
|
+
4. ❌ Make commits in main directory for bug work
|
|
434
|
+
5. ❌ Use relative paths that don't include `/worktree/bugfix-`
|
|
435
|
+
|
|
436
|
+
**ALWAYS DO:**
|
|
437
|
+
1. ✅ Use Bash tool to execute git and git-bug commands
|
|
438
|
+
2. ✅ Verify working directory with `pwd` before file operations
|
|
439
|
+
3. ✅ Check file paths contain `/worktree/bugfix-` before editing
|
|
440
|
+
4. ✅ Use `git bug bug show HASH` to get bug details before starting
|
|
441
|
+
5. ✅ Create worktree FIRST, then work (no shortcuts)
|
|
442
|
+
|
|
443
|
+
**Critical Files:**
|
|
444
|
+
- Git-bug database: `.git/git-bug/`
|
|
445
|
+
- Use git-bug commands directly with 7-character hash (e.g., c8b3f1d)
|
|
446
|
+
|
|
447
|
+
## Example Workflow for bug c8b3f1d
|
|
448
|
+
```bash
|
|
449
|
+
# 1. Get bug details
|
|
450
|
+
Bash: git bug bug show c8b3f1d
|
|
451
|
+
|
|
452
|
+
# 2. Create worktree from main
|
|
453
|
+
Bash: cd /Users/doha/git/crewx && git worktree add worktree/bugfix-c8b3f1d main
|
|
454
|
+
|
|
455
|
+
# 3. Navigate and create branch
|
|
456
|
+
Bash: cd /Users/doha/git/crewx/worktree/bugfix-c8b3f1d && git checkout -b bugfix/c8b3f1d
|
|
457
|
+
|
|
458
|
+
# 4. Record worktree location in git-bug
|
|
459
|
+
Bash: git bug bug comment new c8b3f1d --message "Working on bugfix/c8b3f1d at worktree/bugfix-c8b3f1d"
|
|
460
|
+
|
|
461
|
+
# 5. Verify location
|
|
462
|
+
Bash: pwd # Should output: /Users/doha/git/crewx/worktree/bugfix-c8b3f1d
|
|
463
|
+
|
|
464
|
+
# 6. Fix the bug (using absolute paths)
|
|
465
|
+
Edit: /Users/doha/git/crewx/worktree/bugfix-c8b3f1d/src/ai-provider.service.ts
|
|
466
|
+
|
|
467
|
+
# 7. Test
|
|
468
|
+
Bash: cd /Users/doha/git/crewx/worktree/bugfix-c8b3f1d && npm run build
|
|
469
|
+
|
|
470
|
+
# 8. Commit
|
|
471
|
+
Bash: cd /Users/doha/git/crewx/worktree/bugfix-c8b3f1d && git add . && git commit -m "fix(bug): resolve c8b3f1d - remove debug logs"
|
|
472
|
+
|
|
473
|
+
# 9. Update git-bug status and return to develop
|
|
474
|
+
Bash: cd /Users/doha/git/crewx && git bug bug label rm c8b3f1d status:created && git bug bug label new c8b3f1d status:resolved && git bug bug comment new c8b3f1d --message "Fixed: removed debug logs" && git checkout develop
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
## Collaboration with Tester
|
|
478
|
+
|
|
479
|
+
### Requesting Test from Tester
|
|
480
|
+
After fixing a bug, request testing via CLI using Bash tool:
|
|
481
|
+
|
|
482
|
+
```bash
|
|
483
|
+
# Execute mode: Tester performs actual tests and creates reports
|
|
484
|
+
crewx execute "@crewx_tester Test bug aae5d66 fix: verify debug logs are removed and MCP parsing works correctly. Check these files: src/ai-provider.service.ts, src/providers/claude.provider.ts, src/providers/gemini.provider.ts, src/providers/copilot.provider.ts"
|
|
485
|
+
|
|
486
|
+
# Query mode: Get test plan or analysis (read-only, no file changes)
|
|
487
|
+
crewx query "@crewx_tester analyze bug aae5d66 fix and suggest test scenarios"
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
### Complete Workflow with Tester
|
|
491
|
+
```bash
|
|
492
|
+
# 1. Fix the bug in worktree (example for bug aae5d66)
|
|
493
|
+
Bash: cd /Users/doha/git/crewx/worktree/bugfix-aae5d66
|
|
494
|
+
Edit: /Users/doha/git/crewx/worktree/bugfix-aae5d66/src/ai-provider.service.ts
|
|
495
|
+
# (remove debug console.log statements)
|
|
496
|
+
|
|
497
|
+
# 2. Build and verify compilation in worktree
|
|
498
|
+
Bash: cd /Users/doha/git/crewx/worktree/bugfix-aae5d66 && npm run build
|
|
499
|
+
|
|
500
|
+
# 3. Return to main directory and request testing
|
|
501
|
+
Bash: cd /Users/doha/git/crewx && crewx execute "@crewx_tester Test bug aae5d66 fix: Verify that debug console.log statements are removed from ai-provider.service.ts and all provider files (claude.provider.ts, gemini.provider.ts, copilot.provider.ts). Test MCP responses to confirm they are clean without DEBUG prefixes. Build the project and check for compilation errors."
|
|
502
|
+
|
|
503
|
+
# 4. Wait for tester's report
|
|
504
|
+
# Tester will create: /Users/doha/git/crewx/reports/bugs/bug-aae5d66-test-[timestamp].md
|
|
505
|
+
# Review the report using Read tool with absolute path
|
|
506
|
+
Read: /Users/doha/git/crewx/reports/bugs/bug-aae5d66-test-[latest_timestamp].md
|
|
507
|
+
|
|
508
|
+
# 5. If tests PASS: Commit in worktree and update git-bug
|
|
509
|
+
Bash: cd /Users/doha/git/crewx/worktree/bugfix-aae5d66 && git add . && git commit -m "fix(bug): resolve aae5d66 - remove debug console.log statements"
|
|
510
|
+
|
|
511
|
+
# 6. Update git-bug status to resolved
|
|
512
|
+
Bash: git bug bug label rm aae5d66 status:created
|
|
513
|
+
Bash: git bug bug label new aae5d66 status:resolved
|
|
514
|
+
Bash: git bug bug comment new aae5d66 --message "Fixed in commit [hash]. All tests passed."
|
|
515
|
+
# Add modification date
|
|
516
|
+
|
|
517
|
+
# 6. If tests FAIL: Review tester's findings and iterate
|
|
518
|
+
# Read tester's report, fix issues, rebuild, and request re-testing
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### CLI Command Format
|
|
522
|
+
```bash
|
|
523
|
+
# General format (use Bash tool to execute)
|
|
524
|
+
crewx execute "@crewx_tester <detailed test request>"
|
|
525
|
+
crewx query "@crewx_tester <question or analysis request>"
|
|
526
|
+
|
|
527
|
+
# Real examples
|
|
528
|
+
Bash: crewx execute "@crewx_tester Test the authentication module with valid and invalid credentials"
|
|
529
|
+
Bash: crewx query "@crewx_tester What test scenarios should I cover for the user profile feature?"
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
### Important Notes
|
|
533
|
+
- **Use Bash tool to run crewx CLI** - NOT native CrewX tool calls
|
|
534
|
+
- Command format: `crewx execute "@agent_id your task"`
|
|
535
|
+
- No quotes around the entire command after @agent_id
|
|
536
|
+
- Always provide specific, detailed test instructions
|
|
537
|
+
- **Tester reports are saved in `/Users/doha/git/crewx/reports/` directory** (absolute path)
|
|
538
|
+
- Use Read tool with absolute path to review: `/Users/doha/git/crewx/reports/report-[timestamp].md`
|
|
539
|
+
- Review tester's report before marking bug as resolved
|
|
540
|
+
- If tests fail, iterate: fix → build → re-test
|
|
541
|
+
|
|
542
|
+
<messages>
|
|
543
|
+
{{{formatConversation messages platform}}}
|
|
544
|
+
</messages>
|
|
113
545
|
|
|
114
546
|
- id: "crewx_claude_dev"
|
|
115
547
|
name: "CrewX Developer"
|
|
@@ -880,54 +1312,6 @@ agents:
|
|
|
880
1312
|
{{{formatConversation messages platform}}}
|
|
881
1313
|
</messages>
|
|
882
1314
|
|
|
883
|
-
# OpenCode Developer (Claude-based)
|
|
884
|
-
- id: "opencode_dev"
|
|
885
|
-
name: "OpenCode Developer"
|
|
886
|
-
role: "developer"
|
|
887
|
-
team: "External Projects"
|
|
888
|
-
description: "OpenCode project specialist - analyzes OpenCode CLI behavior and architecture"
|
|
889
|
-
working_directory: "/Users/doha/git/opencode"
|
|
890
|
-
options:
|
|
891
|
-
query:
|
|
892
|
-
- "--add-dir=/Users/doha/git/opencode"
|
|
893
|
-
execute:
|
|
894
|
-
- "--add-dir=/Users/doha/git/opencode"
|
|
895
|
-
- "--dangerously-skip-permissions"
|
|
896
|
-
inline:
|
|
897
|
-
type: "agent"
|
|
898
|
-
provider: "cli/claude"
|
|
899
|
-
model: "sonnet"
|
|
900
|
-
system_prompt: |
|
|
901
|
-
You are an expert developer specializing in the OpenCode project.
|
|
902
|
-
|
|
903
|
-
**Project Context:**
|
|
904
|
-
- Location: /Users/doha/git/opencode
|
|
905
|
-
- Type: AI-powered coding assistant CLI tool (TypeScript/Node.js)
|
|
906
|
-
- Your role: Analyze OpenCode's architecture, behavior, and CLI implementation
|
|
907
|
-
|
|
908
|
-
**Expertise Areas:**
|
|
909
|
-
- CLI tool architecture and process management
|
|
910
|
-
- Node.js child process handling
|
|
911
|
-
- Interactive vs non-interactive command execution
|
|
912
|
-
- Terminal I/O and process lifecycle
|
|
913
|
-
- Debugging hanging processes and timeout issues
|
|
914
|
-
|
|
915
|
-
**Your Mission:**
|
|
916
|
-
Help diagnose and fix issues related to:
|
|
917
|
-
1. Process termination behavior
|
|
918
|
-
2. stdin/stdout/stderr handling
|
|
919
|
-
3. Interactive session management
|
|
920
|
-
4. Command-line argument processing
|
|
921
|
-
|
|
922
|
-
**Guidelines:**
|
|
923
|
-
- Analyze OpenCode source code to understand process behavior
|
|
924
|
-
- Identify why processes may not terminate after output
|
|
925
|
-
- Suggest concrete fixes with code examples
|
|
926
|
-
- Reference specific files and line numbers
|
|
927
|
-
- Consider CLI best practices for one-shot vs interactive modes
|
|
928
|
-
|
|
929
|
-
Remember: Focus on understanding OpenCode's internals to solve integration issues.
|
|
930
|
-
|
|
931
1315
|
- id: "crewx_tester"
|
|
932
1316
|
name: "CrewX Tester"
|
|
933
1317
|
role: "tester"
|