diff --git a/.claude/agents/issue-plan-agent.md b/.claude/agents/issue-plan-agent.md index e78b81cf..bc436241 100644 --- a/.claude/agents/issue-plan-agent.md +++ b/.claude/agents/issue-plan-agent.md @@ -69,19 +69,13 @@ ccw issue status --json function analyzeIssue(issue) { return { issue_id: issue.id, - requirements: extractRequirements(issue.description), - scope: inferScope(issue.title, issue.description), - complexity: determineComplexity(issue), // Low | Medium | High - lifecycle: issue.lifecycle_requirements // User preferences for test/commit + requirements: extractRequirements(issue.context), + scope: inferScope(issue.title, issue.context), + complexity: determineComplexity(issue) // Low | Medium | High } } ``` -**Step 3**: Apply lifecycle requirements to tasks -- `lifecycle.test_strategy` → Configure `test.unit`, `test.commands` -- `lifecycle.commit_strategy` → Configure `commit.type`, `commit.scope` -- `lifecycle.regression_scope` → Configure `regression` array - **Complexity Rules**: | Complexity | Files | Tasks | |------------|-------|-------| @@ -174,7 +168,6 @@ function decomposeTasks(issue, exploration) { message_template: generateCommitMsg(group) }, depends_on: inferDependencies(group, tasks), - executor: inferExecutor(group), priority: calculatePriority(group) // 1-5 (1=highest) })) } diff --git a/.claude/workflows/cli-templates/schemas/solution-schema.json b/.claude/workflows/cli-templates/schemas/solution-schema.json index 6c92d205..814688bc 100644 --- a/.claude/workflows/cli-templates/schemas/solution-schema.json +++ b/.claude/workflows/cli-templates/schemas/solution-schema.json @@ -3,20 +3,20 @@ "title": "Issue Solution Schema", "description": "Schema for solution registered to an issue", "type": "object", - "required": ["id", "issue_id", "tasks", "status", "created_at"], + "required": ["id", "tasks", "is_bound", "created_at"], "properties": { "id": { "type": "string", "description": "Unique solution identifier", "pattern": "^SOL-[0-9]+$" }, - "issue_id": { + "description": { "type": "string", - "description": "Parent issue ID" + "description": "High-level summary of the solution" }, - "plan_session_id": { + "approach": { "type": "string", - "description": "Planning session that created this solution" + "description": "Technical approach or strategy" }, "tasks": { "type": "array", @@ -106,26 +106,9 @@ "type": "integer", "description": "Estimated time to complete" }, - "executor": { - "type": "string", - "enum": ["codex", "gemini", "agent", "auto"], - "default": "auto" - }, - "lifecycle_status": { - "type": "object", - "description": "Lifecycle phase tracking", - "properties": { - "implemented": { "type": "boolean" }, - "tested": { "type": "boolean" }, - "regression_passed": { "type": "boolean" }, - "accepted": { "type": "boolean" }, - "committed": { "type": "boolean" } - } - }, "status": { "type": "string", - "enum": ["pending", "ready", "executing", "completed", "failed", "blocked"], - "default": "pending" + "description": "Task status (optional, for tracking)" }, "priority": { "type": "integer", @@ -164,11 +147,6 @@ "maximum": 1, "description": "Solution quality score (0.0-1.0)" }, - "status": { - "type": "string", - "enum": ["draft", "candidate", "bound", "queued", "executing", "completed", "failed"], - "default": "draft" - }, "is_bound": { "type": "boolean", "default": false, diff --git a/ccw/src/commands/issue.ts b/ccw/src/commands/issue.ts index ff13dfd1..05810b7a 100644 --- a/ccw/src/commands/issue.ts +++ b/ccw/src/commands/issue.ts @@ -26,20 +26,6 @@ interface Issue { context: string; bound_solution_id: string | null; solution_count: number; - source?: string; - source_url?: string; - labels?: string[]; - // Agent workflow fields - affected_components?: string[]; - lifecycle_requirements?: { - test_strategy?: 'unit' | 'integration' | 'e2e' | 'auto'; - regression_scope?: 'full' | 'related' | 'affected'; - commit_strategy?: 'per-task' | 'atomic' | 'squash'; - }; - problem_statement?: string; - expected_behavior?: string; - actual_behavior?: string; - reproduction_steps?: string[]; // Timestamps created_at: string; updated_at: string; @@ -85,16 +71,6 @@ interface SolutionTask { depends_on: string[]; estimated_minutes?: number; - executor: 'codex' | 'gemini' | 'agent' | 'auto'; - - // Lifecycle status tracking - lifecycle_status?: { - implemented: boolean; - tested: boolean; - regression_passed: boolean; - accepted: boolean; - committed: boolean; - }; status?: string; priority?: number; } @@ -117,7 +93,6 @@ interface QueueItem { issue_id: string; solution_id: string; task_id?: string; // Only for task-level queues - title?: string; status: 'pending' | 'ready' | 'executing' | 'completed' | 'failed' | 'blocked'; execution_order: number; execution_group: string; @@ -126,6 +101,7 @@ interface QueueItem { assigned_executor: 'codex' | 'gemini' | 'agent'; task_count?: number; // For solution-level queues files_touched?: string[]; // For solution-level queues + queued_at?: string; started_at?: string; completed_at?: string; result?: Record; @@ -134,7 +110,8 @@ interface QueueItem { interface QueueConflict { type: 'file_conflict' | 'dependency_conflict' | 'resource_conflict'; - tasks: string[]; // Item IDs involved in conflict + tasks?: string[]; // Task IDs involved (task-level queues) + solutions?: string[]; // Solution IDs involved (solution-level queues) file?: string; // Conflicting file path resolution: 'sequential' | 'merge' | 'manual'; resolution_order?: string[]; @@ -173,7 +150,6 @@ interface Queue { interface QueueIndex { active_queue_id: string | null; - active_item_id: string | null; queues: { id: string; status: string; @@ -316,7 +292,7 @@ function ensureQueuesDir(): void { function readQueueIndex(): QueueIndex { const path = join(getQueuesDir(), 'index.json'); if (!existsSync(path)) { - return { active_queue_id: null, active_item_id: null, queues: [] }; + return { active_queue_id: null, queues: [] }; } return JSON.parse(readFileSync(path, 'utf-8')); } @@ -665,7 +641,6 @@ async function taskAction(issueId: string | undefined, taskId: string | undefine if (options.title) solution.tasks[taskIdx].title = options.title; if (options.status) solution.tasks[taskIdx].status = options.status; - if (options.executor) solution.tasks[taskIdx].executor = options.executor as any; writeSolutions(issueId, solutions); console.log(chalk.green(`✓ Task ${taskId} updated`)); @@ -698,8 +673,7 @@ async function taskAction(issueId: string | undefined, taskId: string | undefine scope: 'core', message_template: `feat(core): ${options.title}` }, - depends_on: [], - executor: (options.executor as any) || 'auto' + depends_on: [] }; solution.tasks.push(newTask); @@ -1076,7 +1050,7 @@ async function queueAction(subAction: string | undefined, issueId: string | unde return depItem?.item_id || dep; }), semantic_priority: 0.5, - assigned_executor: task.executor === 'auto' ? 'codex' : task.executor as any + assigned_executor: 'codex' }); added++; }