Skip to content

Commit b58589d

Browse files
author
catlog22
committed
refactor: Update issue queue structure and commands
- Changed queue structure from 'queue' to 'tasks' in various files for clarity. - Updated CLI commands to reflect new task ID usage instead of queue ID. - Enhanced queue management with new delete functionality for historical queues. - Improved metadata handling and task execution tracking. - Updated dashboard and issue manager views to accommodate new task structure. - Bumped version to 6.3.8 in package.json and package-lock.json.
1 parent 2e49327 commit b58589d

File tree

13 files changed

+395
-337
lines changed

13 files changed

+395
-337
lines changed

.claude/agents/issue-plan-agent.md

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,7 @@ You are a specialized issue planning agent that combines exploration and plannin
2020
```javascript
2121
{
2222
// Required
23-
issues: [
24-
{
25-
id: string, // Issue ID (e.g., "GH-123")
26-
title: string, // Issue title
27-
description: string, // Issue description
28-
context: string // Additional context from context.md
29-
}
30-
],
23+
issue_ids: string[], // Issue IDs only (e.g., ["GH-123", "GH-124"])
3124
project_root: string, // Project root path for ACE search
3225

3326
// Optional
@@ -36,6 +29,8 @@ You are a specialized issue planning agent that combines exploration and plannin
3629
}
3730
```
3831

32+
**Note**: Agent receives IDs only. Use `ccw issue status <id> --json` to fetch full details.
33+
3934
## Schema-Driven Output
4035

4136
**CRITICAL**: Read the solution schema first to determine output structure:
@@ -65,6 +60,31 @@ Phase 4: Validation & Output (15%)
6560

6661
## Phase 1: Issue Understanding
6762

63+
### Step 1: Fetch Issue Details via CLI
64+
65+
For each issue ID received, fetch full details:
66+
67+
```bash
68+
ccw issue status <issue-id> --json
69+
```
70+
71+
Returns:
72+
```json
73+
{
74+
"issue": {
75+
"id": "GH-123",
76+
"title": "Add authentication",
77+
"context": "...",
78+
"affected_components": ["auth", "api"],
79+
"lifecycle_requirements": { "test_strategy": "unit", "regression_scope": "affected" }
80+
},
81+
"solutions": [],
82+
"bound": null
83+
}
84+
```
85+
86+
### Step 2: Analyze Issue
87+
6888
**Extract from each issue**:
6989
- Title and description analysis
7090
- Key requirements and constraints
@@ -661,6 +681,23 @@ function generateOutput(solutions, conflicts) {
661681
}
662682
```
663683
684+
### Solution Registration via CLI
685+
686+
**IMPORTANT**: Register solutions using CLI instead of direct file writes:
687+
688+
```bash
689+
# 1. Write solution JSON to temp file
690+
echo '<solution-json>' > /tmp/sol-{issue-id}.json
691+
692+
# 2. Register solution via CLI (auto-generates SOL-xxx ID)
693+
ccw issue bind {issue-id} --solution /tmp/sol-{issue-id}.json
694+
```
695+
696+
**CLI Output**: Returns registered solution ID for summary:
697+
```
698+
✓ Solution SOL-20251227-001 registered (5 tasks)
699+
```
700+
664701
### Solution Schema (Closed-Loop Tasks)
665702
666703
Each task MUST include ALL 5 lifecycle phases:

.claude/agents/issue-queue-agent.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -500,35 +500,35 @@ function canRunParallel(taskKey, groupTasks, taskGraph, conflicts) {
500500
```javascript
501501
function generateQueueItems(orderedTasks, taskGraph, conflicts) {
502502
const queueItems = []
503-
let queueIdCounter = 1
503+
let itemIdCounter = 1
504504

505505
for (const key of orderedTasks) {
506506
const node = taskGraph.get(key)
507507

508508
queueItems.push({
509-
queue_id: `Q-${String(queueIdCounter++).padStart(3, '0')}`,
509+
item_id: `T-${itemIdCounter++}`,
510510
issue_id: node.issue_id,
511511
solution_id: node.solution_id,
512512
task_id: node.task.id,
513513
status: 'pending',
514514
execution_order: node.execution_order,
515515
execution_group: node.execution_group,
516-
depends_on: mapDependenciesToQueueIds(node, queueItems),
516+
depends_on: mapDependenciesToItemIds(node, queueItems),
517517
semantic_priority: node.semantic_priority,
518-
queued_at: new Date().toISOString()
518+
assigned_executor: node.task.executor || 'codex'
519519
})
520520
}
521521

522522
return queueItems
523523
}
524524

525-
function mapDependenciesToQueueIds(node, queueItems) {
525+
function mapDependenciesToItemIds(node, queueItems) {
526526
return (node.task.depends_on || []).map(dep => {
527527
const depKey = `${node.issue_id}:${dep}`
528528
const queueItem = queueItems.find(q =>
529529
q.issue_id === node.issue_id && q.task_id === dep
530530
)
531-
return queueItem?.queue_id || dep
531+
return queueItem?.item_id || dep
532532
})
533533
}
534534
```
@@ -538,7 +538,7 @@ function mapDependenciesToQueueIds(node, queueItems) {
538538
```javascript
539539
function generateOutput(queueItems, conflicts, groups) {
540540
return {
541-
queue: queueItems,
541+
tasks: queueItems,
542542
conflicts: conflicts.map(c => ({
543543
type: c.type,
544544
file: c.file,
@@ -652,10 +652,10 @@ function validateOrdering(queueItems, taskGraph) {
652652
const node = taskGraph.get(key)
653653

654654
// Check dependencies come before
655-
for (const depQueueId of item.depends_on) {
656-
const depItem = queueItems.find(q => q.queue_id === depQueueId)
655+
for (const depItemId of item.depends_on) {
656+
const depItem = queueItems.find(q => q.item_id === depItemId)
657657
if (depItem && depItem.execution_order >= item.execution_order) {
658-
errors.push(`${item.queue_id} ordered before dependency ${depQueueId}`)
658+
errors.push(`${item.item_id} ordered before dependency ${depItemId}`)
659659
}
660660
}
661661
}
@@ -690,7 +690,7 @@ function validateOrdering(queueItems, taskGraph) {
690690
5. Calculate semantic priority for all tasks
691691
6. Validate ordering before output
692692
7. Include rationale for conflict resolutions
693-
8. Map depends_on to queue_ids in output
693+
8. Map depends_on to item_ids in output
694694
695695
**NEVER**:
696696
1. Execute tasks (ordering only)

0 commit comments

Comments
 (0)