mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
docs(issue): Update prompts with multi-queue and worktree support
- issue-queue.md: Add multi-queue management section (activate, priority) - issue-execute.md: Add --worktree parameter for parallel isolation - execute.md: Add worktree option in AskUserQuestion and dispatchExecutor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
description: Execute all solutions from issue queue with git commit after each task
|
||||
argument-hint: ""
|
||||
argument-hint: "[--worktree] [--queue <queue-id>]"
|
||||
---
|
||||
|
||||
# Issue Execute (Codex Version)
|
||||
@@ -9,6 +9,39 @@ argument-hint: ""
|
||||
|
||||
**Serial Execution**: Execute solutions ONE BY ONE from the issue queue via `ccw issue next`. For each solution, complete all tasks sequentially (implement → test → commit per task). Continue autonomously until queue is empty.
|
||||
|
||||
## Worktree Mode (Recommended for Parallel Execution)
|
||||
|
||||
When `--worktree` is specified, create a separate git worktree to isolate work:
|
||||
|
||||
```bash
|
||||
# Step 0: Setup worktree before starting
|
||||
WORKTREE_NAME="issue-exec-$(date +%Y%m%d-%H%M%S)"
|
||||
WORKTREE_PATH="../.worktrees/${WORKTREE_NAME}"
|
||||
|
||||
# Create worktree from current branch
|
||||
git worktree add "${WORKTREE_PATH}" -b "${WORKTREE_NAME}"
|
||||
|
||||
# Change to worktree directory
|
||||
cd "${WORKTREE_PATH}"
|
||||
|
||||
# Now execute in isolated worktree...
|
||||
```
|
||||
|
||||
**Benefits:**
|
||||
- Parallel executors don't conflict with each other
|
||||
- Main working directory stays clean
|
||||
- Easy cleanup after execution
|
||||
|
||||
**Cleanup after completion:**
|
||||
```bash
|
||||
# Return to main repo
|
||||
cd -
|
||||
|
||||
# Remove worktree
|
||||
git worktree remove "${WORKTREE_PATH}"
|
||||
git branch -d "${WORKTREE_NAME}"
|
||||
```
|
||||
|
||||
## Execution Flow
|
||||
|
||||
```
|
||||
@@ -341,9 +374,11 @@ When `ccw issue next` returns `{ "status": "empty" }`:
|
||||
|
||||
| Command | Purpose |
|
||||
|---------|---------|
|
||||
| `ccw issue next` | Fetch next solution from queue |
|
||||
| `ccw issue done <id>` | Mark solution complete with result |
|
||||
| `ccw issue done <id> --fail` | Mark solution failed with reason |
|
||||
| `ccw issue next` | Fetch next solution from queue (auto-selects from active queues) |
|
||||
| `ccw issue next --queue QUE-xxx` | Fetch from specific queue |
|
||||
| `ccw issue done <id>` | Mark solution complete with result (auto-detects queue) |
|
||||
| `ccw issue done <id> --fail --reason "..."` | Mark solution failed with structured reason |
|
||||
| `ccw issue retry --queue QUE-xxx` | Reset failed items in specific queue |
|
||||
|
||||
## Start Execution
|
||||
|
||||
|
||||
@@ -183,10 +183,12 @@ Group assignment:
|
||||
```json
|
||||
{
|
||||
"active_queue_id": "QUE-20251228-120000",
|
||||
"active_queue_ids": ["QUE-20251228-120000"],
|
||||
"queues": [
|
||||
{
|
||||
"id": "QUE-20251228-120000",
|
||||
"status": "active",
|
||||
"priority": 1,
|
||||
"issue_ids": ["ISS-001", "ISS-002"],
|
||||
"total_solutions": 3,
|
||||
"completed_solutions": 0,
|
||||
@@ -196,6 +198,26 @@ Group assignment:
|
||||
}
|
||||
```
|
||||
|
||||
## Multi-Queue Management
|
||||
|
||||
Multiple queues can be active simultaneously. The system executes queues in priority order (lower = higher priority).
|
||||
|
||||
**Activate multiple queues:**
|
||||
```bash
|
||||
ccw issue queue activate QUE-001,QUE-002,QUE-003
|
||||
```
|
||||
|
||||
**Set queue priority:**
|
||||
```bash
|
||||
ccw issue queue priority QUE-001 --priority 1
|
||||
ccw issue queue priority QUE-002 --priority 2
|
||||
```
|
||||
|
||||
**Execution behavior with multi-queue:**
|
||||
- `ccw issue next` automatically selects from active queues in priority order
|
||||
- Complete all items in Q1 before moving to Q2 (serialized execution)
|
||||
- Use `--queue QUE-xxx` to target a specific queue
|
||||
|
||||
### Step 7: Update Issue Statuses
|
||||
|
||||
**MUST use CLI command** (NOT direct file operations):
|
||||
|
||||
Reference in New Issue
Block a user