From 5aa1b75e95357c7ecdffe06b1419a0395a2027fb Mon Sep 17 00:00:00 2001 From: catlog22 Date: Thu, 6 Nov 2025 15:40:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BC=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E5=92=8C=E8=AF=8A=E6=96=AD=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=89=A7=E8=A1=8C=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=BC=BA=E8=B0=83=E5=92=8C=E9=9A=90=E7=A7=81=E4=BF=9D=E6=8A=A4?= =?UTF-8?q?=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/skills/command-guide/SKILL.md | 46 ++- .../command-guide/templates/issue-bug.md | 45 ++- .../templates/issue-diagnosis.md | 275 ++++++++++++++++++ .../command-guide/templates/issue-feature.md | 33 +++ .../command-guide/templates/issue-question.md | 74 ++++- 5 files changed, 453 insertions(+), 20 deletions(-) create mode 100644 .claude/skills/command-guide/templates/issue-diagnosis.md diff --git a/.claude/skills/command-guide/SKILL.md b/.claude/skills/command-guide/SKILL.md index 22a2419d..1b917d73 100644 --- a/.claude/skills/command-guide/SKILL.md +++ b/.claude/skills/command-guide/SKILL.md @@ -78,15 +78,26 @@ Comprehensive command guide for Claude DMS3 workflow system covering 69 commands **When**: User wants to report issue or request feature -**Triggers**: **"CCW-issue"**, **"CCW-help"**, "报告 bug", "功能建议", "问题咨询" +**Triggers**: **"CCW-issue"**, **"CCW-help"**, "报告 bug", "功能建议", "问题咨询", "交互式诊断" **Process**: -1. Use AskUserQuestion to confirm type (bug/feature/question) -2. Collect required information interactively -3. Select appropriate template (`templates/issue-{type}.md`) -4. Generate filled template and save/display +1. Use AskUserQuestion to confirm type (diagnosis/bug/feature/question) +2. Collect required information interactively with **execution flow emphasis** +3. Select appropriate template: + - `issue-diagnosis.md` - Full diagnostic workflow with decision tree + - `issue-bug.md` - Bug report with complete command history + - `issue-feature.md` - Feature request with current workflow analysis + - `issue-question.md` - Question with detailed attempt history +4. Generate filled template with privacy-protected command history +5. Save/display with troubleshooting guidance -**Example**: "CCW-issue" → Interactive Q&A → Generates GitHub issue template +**Example**: "CCW-issue" → Interactive Q&A → Generates GitHub issue template with full execution context + +**🆕 Enhanced Features**: +- Complete command history with privacy protection +- Interactive diagnostic checklists +- Decision tree navigation (diagnosis template) +- Execution environment capture --- @@ -117,11 +128,18 @@ All command metadata is stored in JSON indexes for fast querying: ## 🛠️ Issue Templates -Generate standardized GitHub issue templates: +Generate standardized GitHub issue templates with **execution flow emphasis**: -- **[Bug Report](templates/issue-bug.md)** - Report command errors or system bugs -- **[Feature Request](templates/issue-feature.md)** - Suggest new features or improvements -- **[Question](templates/issue-question.md)** - Ask usage questions or request help +- **[Interactive Diagnosis](templates/issue-diagnosis.md)** - 🆕 Comprehensive diagnostic workflow with decision tree, checklists, and full command history +- **[Bug Report](templates/issue-bug.md)** - Report command errors with complete execution flow and environment details +- **[Feature Request](templates/issue-feature.md)** - Suggest improvements with current workflow analysis and pain points +- **[Question](templates/issue-question.md)** - Ask usage questions with detailed attempt history and context + +**All templates now include**: +- ✅ Complete command history sections (with privacy protection) +- ✅ Execution environment details +- ✅ Interactive problem-locating checklists +- ✅ Structured troubleshooting guidance Templates are auto-populated during Mode 5 (Issue Reporting) interaction. @@ -174,6 +192,12 @@ Team members get latest indexes via `git pull`. --- -**Version**: 1.1.0 +**Version**: 1.2.0 (Issue templates enhanced with execution flow emphasis) **Last Updated**: 2025-11-06 **Maintainer**: Claude DMS3 Team + +**Changelog v1.2.0**: +- ✅ Added Interactive Diagnosis template with decision tree +- ✅ Enhanced all templates with complete command history sections +- ✅ Added privacy protection guidelines for sensitive information +- ✅ Integrated execution flow emphasis across all issue templates diff --git a/.claude/skills/command-guide/templates/issue-bug.md b/.claude/skills/command-guide/templates/issue-bug.md index 66fb4442..81086816 100644 --- a/.claude/skills/command-guide/templates/issue-bug.md +++ b/.claude/skills/command-guide/templates/issue-bug.md @@ -10,10 +10,51 @@ labels: bug -## 执行的命令 +## 完整执行流程 + +### 执行环境 ```bash - +# 工作目录 +# [填写您的工作目录] + +# 相关环境变量(如适用) +# [如:CLAUDE_WORKFLOW_SESSION] +``` + +### 完整命令历史 + + + +```bash +# 命令 1 - [描述此命令的目的] +# [粘贴命令] + +# 输出: +# [粘贴输出,删除敏感信息] + +# 命令 2 - [描述此命令的目的] +# [粘贴命令] + +# 输出: +# [粘贴输出,删除敏感信息] + +# 问题出现在这个命令 ⬇️ +# 命令 3 - [问题命令] +# [粘贴命令] + +# 错误输出: +# [粘贴完整错误信息] +``` + +**隐私保护**: +- ✅ 保留: 命令名称、参数结构、错误代码 +- ❌ 移除: API密钥、密码、真实路径、个人信息 + +### 触发问题的具体命令 + +```bash + ``` ## 期望行为 diff --git a/.claude/skills/command-guide/templates/issue-diagnosis.md b/.claude/skills/command-guide/templates/issue-diagnosis.md new file mode 100644 index 00000000..69d9f89f --- /dev/null +++ b/.claude/skills/command-guide/templates/issue-diagnosis.md @@ -0,0 +1,275 @@ +--- +name: 交互式诊断 +about: 通过结构化流程快速定位问题 +labels: diagnosis +--- + +# 交互式诊断模板 + +> 本模板通过结构化的问题引导,帮助您快速定位问题根源。请按顺序完成各个部分。 + +## 📋 第一步:问题分类 + + + +- [ ] 命令执行失败或报错 +- [ ] 命令执行成功但结果不符合预期 +- [ ] 不知道该使用哪个命令 +- [ ] 配置或环境问题 +- [ ] 工作流程问题 +- [ ] 性能或超时问题 +- [ ] 其他: __________ + +## 📜 第二步:完整执行流程记录 + +> **关键**: 详细记录您的完整操作历史,这是快速定位问题的基础 + +### 2.1 执行环境 + +```bash +# 当前工作目录 +pwd + +# 相关环境变量(如适用) +echo $CLAUDE_WORKFLOW_SESSION +echo $PROJECT_ROOT +``` + +**工作目录**: +**相关环境变量**: + +### 2.2 完整命令历史 + + + + +```bash +# 命令 1 - [简短描述此命令的目的] +# 示例: /workflow:plan --agent "implement user authentication" + +# 输出/结果: +# [请粘贴输出,注意删除敏感信息] + +# 命令 2 - [简短描述此命令的目的] + + +# 输出/结果: + + +# 命令 3 - [简短描述此命令的目的] + + +# 输出/结果: + +``` + +**隐私保护指南**: +- ✅ 可以包含: 命令名称、参数结构、错误代码 +- ❌ 应该移除: API密钥、密码、真实文件路径、个人身份信息 +- 💡 替换示例: + - `/real/path/project` → `/path/to/project` + - `user@email.com` → `user@example.com` + - `sk-abc123xyz` → `sk-***` + +### 2.3 相关文件状态 + + + +- **涉及的文件路径**: +- **文件是否存在**: [ ] 是 / [ ] 否 +- **文件权限**: +- **最近修改时间**: + +## 🔍 第三步:交互式问题定位 + +### 3.1 命令执行问题诊断 + + + +#### 基础检查 +- [ ] 命令名称拼写正确 +- [ ] 所有必需参数都已提供 +- [ ] 参数格式符合文档要求 +- [ ] 路径使用正确的格式(Windows/Linux) +- [ ] 具有执行命令所需的权限 + +#### 环境检查 +- [ ] 在正确的目录下执行命令 +- [ ] 相关依赖工具已安装(如 git, node, gemini, codex) +- [ ] 环境变量配置正确 +- [ ] 没有其他进程占用相关资源 + +#### 上下文检查 +- [ ] Workflow session 状态正常(如适用) +- [ ] 相关配置文件存在且格式正确 +- [ ] 前置步骤已完成 +- [ ] 没有冲突的并发操作 + +### 3.2 结果不符预期诊断 + + + +**期望结果**: + +**实际结果**: + +**差异分析**: +- [ ] 结果格式不同 +- [ ] 内容缺失或多余 +- [ ] 数据内容错误 +- [ ] 文件生成位置错误 +- [ ] 其他: __________ + +**可能原因**: +- [ ] 对命令功能的理解有误 +- [ ] 参数配置不当 +- [ ] 输入数据格式问题 +- [ ] 工作流状态不匹配 +- [ ] 其他: __________ + +### 3.3 使用方法不确定诊断 + + + +**您想要实现的目标**: + +**您已经查看的文档**: +- [ ] getting-started.md +- [ ] workflow-patterns.md +- [ ] cli-tools-guide.md +- [ ] 特定命令文档: __________ +- [ ] 其他: __________ + +**您已经尝试的方法**: +1. +2. +3. + +**具体的困惑点**: +- [ ] 不知道用哪个命令 +- [ ] 不理解参数含义 +- [ ] 不清楚执行顺序 +- [ ] 不知道如何组合使用 +- [ ] 其他: __________ + +## 🔄 第四步:决策树导航 + +```mermaid +graph TD + A[开始诊断] --> B{命令是否执行?} + B -->|是| C{结果是否符合预期?} + B -->|否| D{是否有错误信息?} + + C -->|是| E[可能是理解偏差
查看文档核对预期] + C -->|否| F{结果是部分正确?} + + D -->|是| G[根据错误信息分类] + D -->|否| H[检查命令拼写和语法] + + F -->|是| I[检查参数配置] + F -->|否| J[检查输入数据和环境] + + G --> K{错误类型?} + K -->|权限错误| L[检查文件权限和执行权限] + K -->|文件未找到| M[检查路径和工作目录] + K -->|参数错误| N[核对命令文档] + K -->|超时错误| O[检查网络和资源] + + E --> P[参考: getting-started.md] + I --> Q[参考: cli-tools-guide.md] + J --> R[参考: troubleshooting.md] + L --> S[检查清单 3.1 - 基础检查] + M --> S + N --> Q + O --> T[参考: troubleshooting.md - 性能问题] +``` + +**根据决策树,您的问题可能属于**: + +## 💡 第五步:自助解决尝试 + + + +### 已尝试的解决方案 + +#### 尝试 1: +- **方案**: +- **结果**: [ ] 成功 / [ ] 失败 / [ ] 部分成功 +- **详细说明**: + +#### 尝试 2: +- **方案**: +- **结果**: [ ] 成功 / [ ] 失败 / [ ] 部分成功 +- **详细说明**: + +#### 尝试 3: +- **方案**: +- **结果**: [ ] 成功 / [ ] 失败 / [ ] 部分成功 +- **详细说明**: + +## 📞 第六步:寻求帮助 + + + +### 核心问题总结 + + + +### 卡住的具体环节 + + + +### 最重要的疑问 + + + +### 紧急程度 + +- [ ] 紧急 - 阻碍关键工作进展 +- [ ] 重要 - 影响工作效率但有临时方案 +- [ ] 一般 - 希望改进但不紧急 + +## 📎 附加信息 + +### 系统信息 + +- **操作系统**: Windows / Mac / Linux +- **OS 版本**: +- **Claude Code 版本**: +- **相关工具版本**: + - Git: + - Node: + - Gemini CLI: + - Codex: + - 其他: + +### 相关文件 + + + +- [ ] 命令输出日志 +- [ ] 配置文件内容 +- [ ] 错误截图 +- [ ] Workflow session 文件 +- [ ] 其他: __________ + +### 参考链接 + + + +--- + +## ✅ 提交前检查清单 + +提交此诊断前,请确认: + +- [ ] 已完整填写"完整执行流程记录"(第二步) +- [ ] 已完成至少一个诊断清单(第三步) +- [ ] 已尝试至少 2 种解决方案(第五步) +- [ ] 已清晰总结核心问题(第六步) +- [ ] 已附加必要的系统信息和日志 + +--- + +**诊断日期**: +**提交人**: diff --git a/.claude/skills/command-guide/templates/issue-feature.md b/.claude/skills/command-guide/templates/issue-feature.md index dd251e35..76590025 100644 --- a/.claude/skills/command-guide/templates/issue-feature.md +++ b/.claude/skills/command-guide/templates/issue-feature.md @@ -14,6 +14,39 @@ labels: enhancement +### 当前工作流程 + + + +**典型操作流程**: + +```bash +# 步骤 1 - [描述当前做法] +# [当前使用的命令或操作] + +# 步骤 2 - [描述当前做法] +# [当前使用的命令或操作] + +# 步骤 3 - [描述当前做法] +# [当前使用的命令或操作] +``` + +### 当前方案的痛点 + + + +- **痛点 1**: + - 影响: + - 频率: + +- **痛点 2**: + - 影响: + - 频率: + +- **痛点 3**: + - 影响: + - 频率: + ## 建议的解决方案 diff --git a/.claude/skills/command-guide/templates/issue-question.md b/.claude/skills/command-guide/templates/issue-question.md index 469717eb..1d3a7ca4 100644 --- a/.claude/skills/command-guide/templates/issue-question.md +++ b/.claude/skills/command-guide/templates/issue-question.md @@ -10,21 +10,81 @@ labels: question -## 当前情况 +## 当前情况与执行流程 -### 相关命令 +### 工作环境 ```bash - +# 工作目录 +# [填写您的工作目录] + +# 项目类型 +# [如:React应用、Node.js API、数据分析项目等] ``` -### 已尝试的方法 +### 完整执行流程 -1. -2. -3. + + +#### 尝试 1 + +**目的**: + +**执行的命令**: +```bash +# [粘贴命令] +``` + +**结果**: + +**输出/问题**: +```bash +# [粘贴输出或描述问题,删除敏感信息] +``` + +**您的困惑**: + +#### 尝试 2 + +**目的**: + +**执行的命令**: +```bash +# [粘贴命令] +``` + +**结果**: + +**输出/问题**: +```bash +# [粘贴输出或描述问题] +``` + +**您的困惑**: + +#### 尝试 3 + +**目的**: + +**执行的命令**: +```bash +# [粘贴命令] +``` + +**结果**: + +**输出/问题**: +```bash +# [粘贴输出或描述问题] +``` + +**您的困惑**: + +**隐私保护**: +- ✅ 保留: 命令名称、参数结构 +- ❌ 移除: API密钥、密码、真实路径、个人信息 ## 具体疑问