mcpField
I
issue-manage

issue-manage

github.com/catlog22开发2.1k82 次安装19 周前更新
代码仓库

关于 issue-manage

issue-manage 是通过 `ccw issue` CLI 管理 issue 的交互式 Skill,适用于需要维护问题记录和执行队列的用户。它涵盖筛选、编辑、归档及批量操作,并在删除前要求确认。

主要功能

  1. 01筛选并查看活动 issue
  2. 02查看 issue、解决方案和任务详情
  3. 03编辑标题、优先级、状态等字段
  4. 04管理已完成 issue 历史
  5. 05批量更新、排队或删除

适用场景

  1. 01按状态筛选待处理 issue
  2. 02修改 issue 优先级或状态
  3. 03归档已完成 issue
  4. 04批量将计划中的 issue 加入队列

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/catlog22/claude-code-workflow --skill issue-manage

安装后在 Claude Code 中输入/issue-manage确认已加载。

详细介绍

问题管理技能

通过 ccw issue CLI 执行问题 CRUD 操作的交互式菜单界面。

快速开始

可以向我提出以下请求:

  • “显示所有问题” → 显示带筛选条件的问题列表
  • “查看问题 GH-123” → 查看详细信息
  • “编辑问题优先级” → 修改字段
  • “删除旧问题” → 确认后删除
  • “批量更新状态” → 批量操作
  • “显示已完成的问题” → 查看问题历史记录
  • “归档旧问题” → 移至历史记录

CLI 端点

# Core operations
ccw issue list                      # List active issues
ccw issue list <id> --json          # Get issue details
ccw issue history                   # List completed issues (from history)
ccw issue history --json            # Completed issues as JSON
ccw issue status <id>               # Detailed status
ccw issue init <id> --title "..."   # Create issue
ccw issue task <id> --title "..."   # Add task
ccw issue bind <id> <solution-id>   # Bind solution
ccw issue update <id> --status completed  # Complete & auto-archive

# Solution queries
ccw issue solution <id>             # List solutions for a single issue
ccw issue solution <id> --brief     # Brief: solution_id, files_touched, task_count
ccw issue solutions                 # Batch list all bound solutions
ccw issue solutions --status planned --brief  # Filter by issue status

# Queue management
ccw issue queue                     # List current queue
ccw issue queue add <id>            # Add to queue
ccw issue queue list                # Queue history
ccw issue queue switch <queue-id>   # Switch queue
ccw issue queue archive             # Archive queue
ccw issue queue delete <queue-id>   # Delete queue
ccw issue next                      # Get next task
ccw issue done <queue-id>           # Mark completed
ccw issue update --from-queue       # Sync statuses from queue

操作

1. 列表 📋

筛选和浏览问题:

┌─ Filter by Status ─────────────────┐
│ □ All        □ Registered          │
│ □ Planned    □ Queued              │
│ □ Executing  □ Completed           │
└────────────────────────────────────┘

流程:

  1. 询问筛选偏好 → ccw issue list --json
  2. 显示表格:ID | 状态 | 优先级 | 标题
  3. 选择问题以查看详情
2. 查看 🔍

查看问题详情:

┌─ Issue: GH-123 ─────────────────────┐
│ Title: Fix authentication bug       │
│ Status: planned | Priority: P2      │
│ Solutions: 2 (1 bound)              │
│ Tasks: 5 pending                    │
└─────────────────────────────────────┘

流程:

  1. 获取 ccw issue status <id> --json
  2. 显示问题、解决方案和任务
  3. 提供操作:编辑 | 规划 | 加入队列 | 删除
3. 编辑 ✏️

修改问题字段:

字段选项
标题自由文本
优先级P1-P5
状态registered → completed
上下文问题描述
标签以逗号分隔

流程:

  1. 选择要编辑的字段
  2. 显示当前值
  3. 通过 AskUserQuestion 收集新值
  4. 更新 .workflow/issues/issues.jsonl
4. 删除 🗑️

确认后删除:

⚠️ Delete issue GH-123?
This will also remove:
- Associated solutions
- Queued tasks

[Delete] [Cancel]

流程:

  1. 通过 AskUserQuestion 确认删除
  2. 从 issues.jsonl 中删除
  3. 清理 solutions/<id>.jsonl
  4. 从 queue.json 中删除
5. 历史记录 📚

查看和管理已完成的问题:

┌─ Issue History ─────────────────────┐
│ ID                 Completed   Title │
│ ISS-001  2025-12-28 12:00   Fix bug │
│ ISS-002  2025-12-27 15:30   Feature │
└──────────────────────────────────────┘

流程:

  1. 获取 ccw issue history --json
  2. 显示表格:ID | 完成时间 | 标题
  3. 可选:按日期范围筛选

自动归档:当问题状态变为 completed 时:

  • 问题从 issues.jsonl 移至 issue-history.jsonl
  • 解决方案保留在 solutions/<id>.jsonl 中
  • 队列项目标记为已完成
6. 批量操作 📦

批量操作:

操作说明
更新状态修改多个问题
更新优先级批量更改优先级
添加标签为多个问题添加标签
删除多个问题批量删除
将所有已规划项加入队列将所有已规划项加入队列
重试所有失败项重置失败的任务
从队列同步根据活动队列更新状态

工作流

┌────────────────────────────────────────────────┐
│              Main Menu                          │
│  ┌────┐ ┌────┐ ┌────┐ ┌─────┐ ┌────┐          │
│  │List│ │View│ │Edit│ │Hist.│ │Bulk│          │
│  └──┬─┘ └──┬─┘ └──┬─┘ └──┬──┘ └──┬─┘          │
└─────┼──────┼──────┼──────┼───────┼─────────────┘
      │      │      │      │       │
      ▼      ▼      ▼      ▼       ▼
   Filter  Detail  Fields  History Multi
   Select  Actions Update  Browse  Select
      │      │      │      │       │
      └──────┴──────┴──────┴───────┘
                    │
                    ▼
             Back to Menu

问题生命周期:

registered → planned → queued → executing → completed
                                               │
                                               ▼
                                    issue-history.jsonl

实现指南

入口点
// Parse input for issue ID
const issueId = input.match(/^([A-Z]+-\d+|ISS-\d+)/i)?.[1];

// Show main menu
await showMainMenu(issueId);
主菜单模式
// 1. Fetch dashboard data
const issues = JSON.parse(Bash('ccw issue list --json') || '[]');
const history = JSON.parse(Bash('ccw issue history --json 2>/dev/null') || '[]');
const queue = JSON.parse(Bash('ccw issue queue --json 2>/dev/null') || '{}');

// 2. Display summary
console.log(`Active: ${issues.length} | Completed: ${history.length} | Queue: ${queue.pending_count || 0} pending`);

// 3. Ask action via AskUserQuestion
const action = AskUserQuestion({
  questions: [{
    question: 'What would you like to do?',
    header: 'Action',
    options: [
      { label: 'List Issues', description: 'Browse active issues' },
      { label: 'View Issue', description: 'Detail view (includes history)' },
      { label: 'Edit Issue', description: 'Modify fields' },
      { label: 'Bulk Operations', description: 'Batch actions' }
    ]
  }]
});

// 4. Route to handler
筛选模式
const filter = AskUserQuestion({
  questions: [{
    question: 'Filter by status?',
    header: 'Filter',
    multiSelect: true,
    options: [
      { label: 'All', description: 'Show all' },
      { label: 'Registered', description: 'Unplanned' },
      { label: 'Planned', description: 'Has solution' },
      { label: 'Executing', description: 'In progress' }
    ]
  }]
});
编辑模式
// Select field
const field = AskUserQuestion({...});

// Get new value based on field type
// For Priority: show P1-P5 options
// For Status: show status options
// For Title: accept free text via "Other"

// Update file
const issuesPath = '.workflow/issues/issues.jsonl';
// Read → Parse → Update → Write

数据文件

文件用途
.workflow/issues/issues.jsonl活动问题记录
.workflow/issues/issue-history.jsonl已完成的问题(已归档)
.workflow/issues/solutions/<id>.jsonl每个问题的解决方案
.workflow/issues/queues/index.json队列索引(多队列)
.workflow/issues/queues/<queue-id>.json单个队列文件

错误处理

错误解决方法
未找到问题建议使用 /issue:new 创建问题
未找到问题显示可用问题并重新提示
写入失败检查文件权限
队列错误显示 ccw 错误消息

相关命令

  • /issue:new - 创建结构化问题
  • /issue:plan - 生成解决方案
  • /issue:queue - 组成执行队列
  • /issue:execute - 执行任务

评论

支持 Markdown