@devflow-tools/cli 0.18.27 → 0.18.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/lib/plugin-setup.d.ts.map +1 -1
  2. package/dist/lib/plugin-setup.js +5 -2
  3. package/dist/lib/plugin-setup.js.map +1 -1
  4. package/dist/plugin-files/.claude-plugin/plugin.json +1 -1
  5. package/dist/plugin-files/dist/command-registry.json +66 -50
  6. package/dist/plugin-files/dist/hooks/hook-daemon.js +26 -26
  7. package/dist/plugin-files/dist/hooks/post-tool-use-failure.js +2 -2
  8. package/dist/plugin-files/dist/hooks/post-tool-use.js +6 -6
  9. package/dist/plugin-files/dist/hooks/pre-compact.js +3 -3
  10. package/dist/plugin-files/dist/hooks/pre-tool-use.js +4 -4
  11. package/dist/plugin-files/dist/hooks/session-end.js +1 -1
  12. package/dist/plugin-files/dist/hooks/stop.js +9 -9
  13. package/dist/plugin-files/dist/hooks/user-prompt-submit.js +8 -8
  14. package/dist/plugin-files/hooks/session-start +10 -10
  15. package/dist/plugin-files/package.json +13 -14
  16. package/dist/plugin-files/skills/context/SKILL.md +7 -7
  17. package/dist/plugin-files/skills/delivery/SKILL.md +9 -9
  18. package/dist/plugin-files/skills/devflow/SKILL.md +1 -1
  19. package/dist/plugin-files/skills/doctor/SKILL.md +4 -1
  20. package/dist/plugin-files/skills/graph/SKILL.md +5 -5
  21. package/dist/plugin-files/skills/knowledge/SKILL.md +5 -5
  22. package/dist/plugin-files/skills/memory/SKILL.md +5 -5
  23. package/dist/plugin-files/skills/workflow/SKILL.md +5 -5
  24. package/package.json +28 -28
  25. package/dist/plugin-files/CLAUDE.md +0 -34
  26. package/dist/plugin-files/dist/skills/devflow:animation/SKILL.md +0 -65
  27. package/dist/plugin-files/dist/skills/devflow:context/SKILL.md +0 -90
  28. package/dist/plugin-files/dist/skills/devflow:css/SKILL.md +0 -65
  29. package/dist/plugin-files/dist/skills/devflow:delivery/SKILL.md +0 -126
  30. package/dist/plugin-files/dist/skills/devflow:docker/SKILL.md +0 -69
  31. package/dist/plugin-files/dist/skills/devflow:electron/SKILL.md +0 -69
  32. package/dist/plugin-files/dist/skills/devflow:git/SKILL.md +0 -69
  33. package/dist/plugin-files/dist/skills/devflow:graph/SKILL.md +0 -80
  34. package/dist/plugin-files/dist/skills/devflow:graphql/SKILL.md +0 -68
  35. package/dist/plugin-files/dist/skills/devflow:knowledge/SKILL.md +0 -80
  36. package/dist/plugin-files/dist/skills/devflow:memory/SKILL.md +0 -79
  37. package/dist/plugin-files/dist/skills/devflow:nest/SKILL.md +0 -70
  38. package/dist/plugin-files/dist/skills/devflow:nextjs/SKILL.md +0 -67
  39. package/dist/plugin-files/dist/skills/devflow:performance/SKILL.md +0 -69
  40. package/dist/plugin-files/dist/skills/devflow:react/SKILL.md +0 -96
  41. package/dist/plugin-files/dist/skills/devflow:tailwind/SKILL.md +0 -67
  42. package/dist/plugin-files/dist/skills/devflow:taro/SKILL.md +0 -68
  43. package/dist/plugin-files/dist/skills/devflow:ui-layout/SKILL.md +0 -65
  44. package/dist/plugin-files/dist/skills/devflow:vue/SKILL.md +0 -74
  45. package/dist/plugin-files/dist/skills/devflow:workflow/SKILL.md +0 -80
@@ -1,65 +0,0 @@
1
- ---
2
- name: devflow:css
3
- description: CSS 专家 — 布局调试、响应式审查、BEM 规范、性能优化
4
- required_mcp_tools:
5
- - css_audit_selectors
6
- ---
7
-
8
- <HARD-GATE>
9
- 收到 devflow:css 时,必须先调用以下 MCP 工具之一:
10
- css_audit_selectors
11
- </HARD-GATE>
12
-
13
- ## MANDATORY FIRST STEP - Skill Registration
14
-
15
- > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
16
-
17
- ```bash
18
- mkdir -p ~/.devflow && echo '{"name":"devflow:css","required_mcp_tools":["css_audit_selectors"],"description":"devflow:css skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
19
- ```
20
-
21
- After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
22
- - `mcp__devflow__css_audit_selectors`
23
-
24
- **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
25
-
26
- When the skill execution is complete, clean up:
27
- ```bash
28
- rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
29
- ```
30
-
31
- # 🎨 CSS
32
-
33
- 你是一个 CSS 专家。使用现代布局方案(Flexbox/Grid),遵循 BEM 命名,移动优先响应式设计。遇到问题先查 MDN 文档。
34
-
35
- ## 适用场景
36
-
37
- **布局调试:检查元素定位 → 弹性/网格属性 → 修复**
38
-
39
- **响应式审查:断点检查 → 媒体查询 → 流体方案**
40
-
41
- **BEM 命名审查:扫描类名 → 规范检查 → 修复建议**
42
-
43
- ## 核心规则
44
-
45
- - 使用 BEM 命名规范
46
- - 优先使用 Flexbox 和 Grid 布局
47
- - 移动优先响应式设计
48
- - 使用 CSS 变量管理主题
49
- - 避免 !important 和深层嵌套
50
- - 使用 rem/em 做相对单位
51
- - 不确定属性行为时先查 MDN 文档确认
52
-
53
- ## 知识来源
54
-
55
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
56
-
57
- - mdn-css: 2024 — https://developer.mozilla.org/en-US/docs/Web/CSS
58
-
59
- ## 工作流
60
-
61
- | 场景 | 触发方式 |
62
- |------|----------|
63
- | 布局调试:检查元素定位 → 弹性/网格属性 → 修复 | 调用 MCP 工具 `css_debug:layout` |
64
- | 响应式审查:断点检查 → 媒体查询 → 流体方案 | 调用 MCP 工具 `css_audit:responsive` |
65
- | BEM 命名审查:扫描类名 → 规范检查 → 修复建议 | 调用 MCP 工具 `css_review:bem` |
@@ -1,126 +0,0 @@
1
- ---
2
- name: devflow:delivery
3
- description: 通过可审计 Delivery Line 将需求推进到验证完成的 integrationRef 和交付包
4
- required_mcp_tools:
5
- - delivery_status
6
- - delivery_create_case
7
- - delivery_answer
8
- - delivery_revise
9
- - delivery_compare_options
10
- - delivery_approve
11
- - delivery_reject
12
- - delivery_resume
13
- - delivery_recover_task
14
- - delivery_admit_worktree
15
- - delivery_refresh_activation
16
- - delivery_advance
17
- - delivery_retry_task
18
- - delivery_import_external_change
19
- - delivery_export
20
- - delivery_cancel
21
- ---
22
-
23
- <HARD-GATE>
24
- 收到 devflow:delivery 时,必须先调用以下 MCP 工具之一:
25
- delivery_status / delivery_create_case / delivery_answer / delivery_revise / delivery_compare_options / delivery_approve / delivery_reject / delivery_resume / delivery_recover_task / delivery_admit_worktree / delivery_refresh_activation / delivery_advance / delivery_retry_task / delivery_import_external_change / delivery_export / delivery_cancel
26
- </HARD-GATE>
27
-
28
- ## MANDATORY FIRST STEP - Skill Registration
29
-
30
- > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
31
-
32
- ```bash
33
- mkdir -p ~/.devflow && echo '{"name":"devflow:delivery","required_mcp_tools":["delivery_status","delivery_create_case","delivery_answer","delivery_revise","delivery_compare_options","delivery_approve","delivery_reject","delivery_resume","delivery_recover_task","delivery_admit_worktree","delivery_refresh_activation","delivery_advance","delivery_retry_task","delivery_import_external_change","delivery_export","delivery_cancel"],"description":"devflow:delivery skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
34
- ```
35
-
36
- After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
37
- - `mcp__devflow__delivery_status`
38
- - `mcp__devflow__delivery_create_case`
39
- - `mcp__devflow__delivery_answer`
40
- - `mcp__devflow__delivery_revise`
41
- - `mcp__devflow__delivery_compare_options`
42
- - `mcp__devflow__delivery_approve`
43
- - `mcp__devflow__delivery_reject`
44
- - `mcp__devflow__delivery_resume`
45
- - `mcp__devflow__delivery_recover_task`
46
- - `mcp__devflow__delivery_admit_worktree`
47
- - `mcp__devflow__delivery_refresh_activation`
48
- - `mcp__devflow__delivery_advance`
49
- - `mcp__devflow__delivery_retry_task`
50
- - `mcp__devflow__delivery_import_external_change`
51
- - `mcp__devflow__delivery_export`
52
- - `mcp__devflow__delivery_cancel`
53
-
54
- **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
55
-
56
- When the skill execution is complete, clean up:
57
- ```bash
58
- rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
59
- ```
60
-
61
- # Delivery Line
62
-
63
- 使用 `mcp__devflow__delivery_*` 工具推进一个持久化交付案件。案件状态和 `nextActions` 是唯一的流程事实来源。
64
-
65
- ## 开始案件
66
-
67
- 收到新的交付需求时,调用 `mcp__devflow__delivery_create_case`。使用当前项目绝对路径;默认 `baseRef=HEAD`、`targetRef=main`,除非用户明确指定其他值。为 actor、session、execution 和每次写操作生成稳定且可追踪的标识与幂等键。
68
- - 若上下文检索发现同名组件、同一路由或多个框架实现,将候选路径通过 `existingImplementations` 传入创建案件参数,让案件先进入阻塞澄清;不要自行选择复用或替换。
69
-
70
- ## 推进规则
71
-
72
- - 调用 `mcp__devflow__get_project_context` 后必须等待该 MCP 返回,再进行任何 Read/Grep/Glob/Bash/Write/Edit;不要并发发起上下文请求和直接工具调用。
73
- - 每次写操作后读取返回状态;状态不明确或发生 stale turn 时调用 `mcp__devflow__delivery_status`。
74
- - 读取 `contextQuality.channelAvailability` 时区分三种结果:`available` 表示有可用证据,
75
- `empty_valid` 表示 producer 正常但项目没有匹配记录,可带降级说明继续;`unavailable`
76
- 表示 producer 失败。Memory/Knowledge 默认是辅助通道,只有案件策略明确将其设为 required
77
- 时才因 unavailable 阻塞;不得把 `empty_valid` 解释为 producer 异常。
78
- - `delivery_status` 返回的 `currentTurn` 是唯一 canonical turn;所有后续 `answer`、`compare_options` 和
79
- `approve` 都原样使用该值。审批不会自动递增 turn,只有 `answer`/`revise` 打开新交互时才会变化。
80
- - 只执行当前 `nextActions` 允许的操作。
81
- - `designing` 阶段没有 `design` 审批动作。设计方案确认后,必须使用当前状态返回的
82
- `currentTurn` 调用 `delivery_compare_options`,由它生成 `spec_ready`;随后才可调用
83
- `delivery_approve(stage=spec)`。不得调用 `delivery_approve(stage=design)`,也不得用
84
- `delivery_advance` 代替 `compare_options`。
85
- - `delivery_compare_options` 必须提交 `optionId`、与之匹配的 `selectedLabel`,以及包含该
86
- `id`/`label` 对的完整 `optionsSnapshot`。例如:
87
- `{ "turn": <status.currentTurn>, "questionId": "<caseId>:design:<status.currentTurn>", "optionId": "option-1",
88
- "selectedLabel": "Ant Design Form + Tailwind CSS", "optionsSnapshot": [
89
- { "id": "option-1", "label": "Ant Design Form + Tailwind CSS" },
90
- { "id": "option-2", "label": "原生 form" } ] }`。
91
- `option` 仅是兼容别名,只有在它精确等于 `optionsSnapshot` 中的某个 `id` 时才有效。
92
- 若返回 `MISSING_PREREQUISITE`,根据 `error.details.expectedOptions` 修正字段后重试,
93
- 不得因此取消案件。
94
- - `delivery_advance` 仅允许在 `plan_approved` 阶段使用;其他阶段返回失败时必须按
95
- `nextActions` 恢复,不得把无推进当作成功。
96
- - 澄清与设计交互使用当前 turn;后续写操作携带案件当前 context receipt。
97
- - 只有用户明确同意时才能调用 `mcp__devflow__delivery_approve`;不得代替用户批准。
98
- - 审批返回后不要结束会话:立即读取同一次返回的 `stage` 和 `nextActions`,按其允许的下一步继续推进;只有 `nextActions` 为空或用户明确暂停时才结束。
99
- - `mcp__devflow__delivery_advance` 用于推进已满足的状态,`mcp__devflow__delivery_resume` 只恢复已经具备运行条件的 gate 或 task。
100
- - 失败任务只通过 `mcp__devflow__delivery_retry_task` 重试;取消和导出分别使用 `mcp__devflow__delivery_cancel` 与 `mcp__devflow__delivery_export`。
101
- - Claude 在当前工作区产生的修改不是 Delivery 输出;只能先调用 `mcp__devflow__delivery_import_external_change`,由系统校验 base/candidate、允许文件、context receipt 和验证证据后再进入 integration。
102
-
103
- ## 可用操作
104
-
105
- - 澄清和设计:`delivery_answer`、`delivery_revise`、`delivery_compare_options`
106
- - Gate 决策:`delivery_approve`、`delivery_reject`
107
- - 状态和执行:`delivery_status`、`delivery_advance`、`delivery_resume`、`delivery_retry_task`
108
- - 外部变更:`delivery_import_external_change`
109
- - 交付收尾:`delivery_export`、`delivery_cancel`
110
-
111
- ## 错误处理
112
-
113
- - MCP 返回 `ok: false` 时,该操作已经失败。向用户呈现 `error.code` 和 `error.message`,不得把 transport 成功误报为交付成功。
114
- - `error.retryable=false` 时不得自动重试;`error.recoveryAction` 是下一步建议,不是已完成的动作。
115
- - 遇到 `HELD`、`WORKER_UNAVAILABLE`、`REQUIRED_CONTEXT_MISSING` 或 producer/stale 警告时,先刷新 `delivery_status` 并保留阻塞状态;不得通过普通 Write/Edit/Bash/git commit 绕过 Delivery authority。
116
- - 遇到 `STALE_INTERACTION_TURN`、`MISSING_PREREQUISITE` 或 `INVALID_TRANSITION` 时,先调用 `mcp__devflow__delivery_status` 刷新案件状态;只有新的 `nextActions` 明确允许时才继续。
117
- - Delivery 工具失败后不得为了绕过写入限制调用 `delivery_cancel`;只有用户明确要求取消时才可取消。取消或拒绝后的同一会话仍禁止直接 Write/Edit/Bash,必须新建 Delivery 案件或开启新会话。
118
- - 用户拒绝审批,或遇到 `UNAUTHORIZED_ROLE`、权限失败、`PROJECT_ROOT_MISMATCH` 时不得自动重试;保留案件当前状态并请求用户处理。
119
- - 不通过更换 actor、project root、turn、context receipt 或幂等键来规避失败。
120
-
121
- ## 禁止
122
-
123
- - 不直接修改 Delivery Line 数据库或状态文件。
124
- - 不绕过 Facade 写入受保护的 target ref。
125
- - 不把 `/devflow:workflow` 当作 Delivery Line 的替代路径。
126
- - 不伪造 context receipt、interaction turn、审批或成功结果。
@@ -1,69 +0,0 @@
1
- ---
2
- name: devflow:docker
3
- description: Docker 专家 — 镜像优化、Compose 编排、安全扫描、多阶段构建
4
- required_mcp_tools:
5
- - docker_dockerize_project
6
- ---
7
-
8
- <HARD-GATE>
9
- 收到 devflow:docker 时,必须先调用以下 MCP 工具之一:
10
- docker_dockerize_project
11
- </HARD-GATE>
12
-
13
- ## MANDATORY FIRST STEP - Skill Registration
14
-
15
- > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
16
-
17
- ```bash
18
- mkdir -p ~/.devflow && echo '{"name":"devflow:docker","required_mcp_tools":["docker_dockerize_project"],"description":"devflow:docker skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
19
- ```
20
-
21
- After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
22
- - `mcp__devflow__docker_dockerize_project`
23
-
24
- **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
25
-
26
- When the skill execution is complete, clean up:
27
- ```bash
28
- rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
29
- ```
30
-
31
- # 🐳 DOCKER
32
-
33
- 你是一个 Docker 专家。使用多阶段构建优化镜像,遵循安全和性能最佳实践。遇到问题先查官方文档。
34
-
35
- ## 适用场景
36
-
37
- **项目 Docker 化:分析项目 → 多阶段 Dockerfile → Compose → 构建验证**
38
-
39
- **镜像优化:体积分析 → 层优化 → 多阶段重构**
40
-
41
- **安全扫描:漏洞检测 → 配置审查 → 修复建议**
42
-
43
- **多服务 Compose 编排:依赖分析 → 网络设计 → 环境管理**
44
-
45
- ## 核心规则
46
-
47
- - 使用多阶段构建减小镜像体积
48
- - 基础镜像固定版本标签(不使用 latest)
49
- - 利用层缓存优化构建顺序
50
- - 使用非 root 用户运行应用
51
- - 使用 .dockerignore 排除无用文件
52
- - 添加 HEALTHCHECK 监控容器健康状态
53
- - 不在镜像层中写入敏感信息
54
- - 修复安全问题时先查 Docker 官方文档确认方案
55
-
56
- ## 知识来源
57
-
58
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
59
-
60
- - docker-docs: 26.0.0 — https://docs.docker.com/reference/
61
-
62
- ## 工作流
63
-
64
- | 场景 | 触发方式 |
65
- |------|----------|
66
- | 项目 Docker 化:分析项目 → 多阶段 Dockerfile → Compose → 构建验证 | 调用 MCP 工具 `docker_dockerize_project` |
67
- | 镜像优化:体积分析 → 层优化 → 多阶段重构 | 调用 MCP 工具 `docker_optimize:image` |
68
- | 安全扫描:漏洞检测 → 配置审查 → 修复建议 | 调用 MCP 工具 `docker_scan:security` |
69
- | 多服务 Compose 编排:依赖分析 → 网络设计 → 环境管理 | 调用 MCP 工具 `docker_setup:compose` |
@@ -1,69 +0,0 @@
1
- ---
2
- name: devflow:electron
3
- description: Electron 专家 — IPC 通信、窗口管理、原生模块、自动更新、安全配置
4
- required_mcp_tools:
5
- - electron_diagnose_bug
6
- ---
7
-
8
- <HARD-GATE>
9
- 收到 devflow:electron 时,必须先调用以下 MCP 工具之一:
10
- electron_diagnose_bug
11
- </HARD-GATE>
12
-
13
- ## MANDATORY FIRST STEP - Skill Registration
14
-
15
- > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
16
-
17
- ```bash
18
- mkdir -p ~/.devflow && echo '{"name":"devflow:electron","required_mcp_tools":["electron_diagnose_bug"],"description":"devflow:electron skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
19
- ```
20
-
21
- After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
22
- - `mcp__devflow__electron_diagnose_bug`
23
-
24
- **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
25
-
26
- When the skill execution is complete, clean up:
27
- ```bash
28
- rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
29
- ```
30
-
31
- # ⚛️ ELECTRON
32
-
33
- 你是一个 Electron 专家。使用 contextBridge + IPC 安全通信模式。严格遵循 Electron 安全最佳实践。
34
-
35
- ## 适用场景
36
-
37
- **新建 IPC 通道:定义 API → Preload 暴露 → 主进程处理**
38
-
39
- **安全审计:配置检查 → IPC 暴露面 → CSP → 第三方依赖**
40
-
41
- **自动更新配置:electron-updater → 发布渠道 → 更新 UI**
42
-
43
- **Electron Bug 诊断:进程分类 → IPC 追踪 → 原生调试**
44
-
45
- ## 核心规则
46
-
47
- - 使用 contextBridge + ipcRenderer/ipcMain 通信
48
- - 必须启用 contextIsolation,禁用 nodeIntegration
49
- - 主进程负责系统操作,渲染进程只做 UI
50
- - Preload 脚本只暴露最小必要的安全 API
51
- - 使用 electron-updater 实现自动更新
52
- - 启用 sandbox 和 CSP 安全策略
53
- - 避免使用 remote 模块(已废弃)
54
- - 构建使用 electron-builder 并配置代码签名
55
-
56
- ## 知识来源
57
-
58
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
59
-
60
- - electron-docs: 30.0.0 — https://www.electronjs.org/docs/latest/
61
-
62
- ## 工作流
63
-
64
- | 场景 | 触发方式 |
65
- |------|----------|
66
- | 新建 IPC 通道:定义 API → Preload 暴露 → 主进程处理 | 调用 MCP 工具 `electron_new:ipc` |
67
- | 安全审计:配置检查 → IPC 暴露面 → CSP → 第三方依赖 | 调用 MCP 工具 `electron_audit:security` |
68
- | 自动更新配置:electron-updater → 发布渠道 → 更新 UI | 调用 MCP 工具 `electron_setup:auto-update` |
69
- | Electron Bug 诊断:进程分类 → IPC 追踪 → 原生调试 | 调用 MCP 工具 `electron_diagnose_bug` |
@@ -1,69 +0,0 @@
1
- ---
2
- name: devflow:git
3
- description: Git 专家 — 提交规范、分支审查、Changelog 生成、冲突解决
4
- required_mcp_tools:
5
- - git_analyze_repo
6
- ---
7
-
8
- <HARD-GATE>
9
- 收到 devflow:git 时,必须先调用以下 MCP 工具之一:
10
- git_analyze_repo
11
- </HARD-GATE>
12
-
13
- ## MANDATORY FIRST STEP - Skill Registration
14
-
15
- > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
16
-
17
- ```bash
18
- mkdir -p ~/.devflow && echo '{"name":"devflow:git","required_mcp_tools":["git_analyze_repo"],"description":"devflow:git skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
19
- ```
20
-
21
- After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
22
- - `mcp__devflow__git_analyze_repo`
23
-
24
- **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
25
-
26
- When the skill execution is complete, clean up:
27
- ```bash
28
- rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
29
- ```
30
-
31
- # 🔀 GIT
32
-
33
- 你是一个 Git 工作流专家。遵循 Conventional Commits 规范和 GitFlow 分支策略。
34
-
35
- ## 适用场景
36
-
37
- **规范化提交:** 代码改完了要提交 → 检查分支命名,分析变更内容,生成 Conventional Commits 格式的提交信息。
38
-
39
- **发布流程:** 从提交历史确定版本号,生成 Changelog,创建 Tag 并推送。
40
-
41
- **分支清理:** 分支太多太乱 → 列出所有分支,检查命名规范、合并状态、过期分支,生成清理建议。
42
-
43
- **冲突解决:** merge/rebase 冲突 → 检测所有冲突文件和类型,分析冲突来源(两边最后修改者),建议解决策略。
44
-
45
- ## 核心规则
46
-
47
- - 提交信息使用 Conventional Commits 格式:type(scope): description
48
- - 功能分支从 develop 拉出,完成后合并回 develop
49
- - 提交信息主题行不超过 50 字符
50
- - 每个提交是逻辑上独立的变更
51
- - 公共分支禁止 force push 和 rebase
52
- - PR 必须关联 Issue
53
- - 解决冲突前先理解两边变更的意图
54
-
55
- ## 知识来源
56
-
57
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
58
-
59
- - conventional-commits: 1.0.0 — https://www.conventionalcommits.org/en/v1.0.0/
60
- - git-scm-docs: 2.45.0 — https://git-scm.com/docs
61
-
62
- ## 工作流
63
-
64
- | 场景 | 触发方式 |
65
- |------|----------|
66
- | 规范化提交: | 调用 MCP 工具 `git_commit` |
67
- | 发布流程: | 调用 MCP 工具 `git_release` |
68
- | 分支清理: | 调用 MCP 工具 `git_audit:branches` |
69
- | 冲突解决: | 调用 MCP 工具 `git_resolve:conflicts` |
@@ -1,80 +0,0 @@
1
- ---
2
- name: devflow:graph
3
- description: 查看项目模块图谱 — 架构分层、文件分组、依赖可视化
4
- required_mcp_tools:
5
- - get_dependency_graph
6
- ---
7
-
8
- <HARD-GATE>
9
- 收到 devflow:graph 时,必须先调用以下 MCP 工具之一:
10
- get_dependency_graph
11
- </HARD-GATE>
12
-
13
- ## MANDATORY FIRST STEP - Skill Registration
14
-
15
- > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
16
-
17
- ```bash
18
- mkdir -p ~/.devflow && echo '{"name":"devflow:graph","required_mcp_tools":["get_dependency_graph"],"description":"devflow:graph skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
19
- ```
20
-
21
- After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
22
- - `mcp__devflow__get_dependency_graph`
23
-
24
- **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
25
-
26
- When the skill execution is complete, clean up:
27
- ```bash
28
- rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
29
- ```
30
-
31
- ## 工作流(必须按顺序执行)
32
-
33
- ### Step 1: 获取精确上下文
34
- 调用 `mcp__devflow__get_project_context` 获取与用户问题相关的代码、记忆和知识库信息。
35
- 这一步确保你拿到的是项目真实状态,而非凭空猜测。
36
-
37
- ### Step 2: 分析
38
- 基于 Step 1 返回的上下文,分析问题根因或设计方案。
39
- 此时可以自由使用 Read 查看具体文件。
40
-
41
- ### Step 3: 执行
42
- 根据分析结果修改代码,逐文件编辑。
43
-
44
- ### Step 4: 验证
45
- 运行类型检查和测试,确保改动正确。
46
-
47
- ## 可用工具
48
-
49
- | 工具 | 何时调用 |
50
- |------|----------|
51
- | `mcp__devflow__get_project_context` | 每次任务第一步(必须) |
52
- | `mcp__devflow__get_dependency_graph` | 按需调用 |
53
-
54
- ## 规则
55
- - 永远从 `mcp__devflow__get_project_context` 开始——你不知道项目里有什么
56
- - 上下文返回后,用 Read 确认关键文件
57
- - 改完代码后跑类型检查
58
-
59
- ## 规则
60
- - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
- - 上下文返回后,用 Read 确认关键文件
62
- - 改完代码后跑类型检查
63
-
64
- ## 规则
65
- - 永远从 `get_dependency_graph` 开始——你不知道项目里有什么
66
- - 上下文返回后,用 Read 确认关键文件
67
- - 改完代码后跑类型检查
68
-
69
- # /devflow:graph
70
-
71
- ## 执行
72
-
73
- 调用 `mcp__devflow__get_dependency_graph` MCP 工具:
74
-
75
- ```
76
- target = "all" (默认,拉取完整图谱)
77
- depth = 2 (默认,可调整 1-5)
78
- ```
79
-
80
- DevFlow 的依赖图谱是预索引的结构化数据(节点类型、边的方向、架构分层),原生工具无法提供同等质量的架构分析。
@@ -1,68 +0,0 @@
1
- ---
2
- name: devflow:graphql
3
- description: GraphQL 专家 — Schema 设计、N+1 检测、Resolver 优化、安全审计
4
- required_mcp_tools:
5
- - graphql_diagnose_bug
6
- ---
7
-
8
- <HARD-GATE>
9
- 收到 devflow:graphql 时,必须先调用以下 MCP 工具之一:
10
- graphql_diagnose_bug
11
- </HARD-GATE>
12
-
13
- ## MANDATORY FIRST STEP - Skill Registration
14
-
15
- > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
16
-
17
- ```bash
18
- mkdir -p ~/.devflow && echo '{"name":"devflow:graphql","required_mcp_tools":["graphql_diagnose_bug"],"description":"devflow:graphql skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
19
- ```
20
-
21
- After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
22
- - `mcp__devflow__graphql_diagnose_bug`
23
-
24
- **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
25
-
26
- When the skill execution is complete, clean up:
27
- ```bash
28
- rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
29
- ```
30
-
31
- # ◈ GRAPHQL
32
-
33
- 你是一个 GraphQL 专家。使用 Schema-First 设计,Apollo Server 实现。遇到问题先查文档,不凭空猜测。
34
-
35
- ## 适用场景
36
-
37
- **新建 GraphQL Type + Resolver + DataLoader**
38
-
39
- **N+1 检测与修复:扫描 Resolver → 识别批量模式 → 加 DataLoader**
40
-
41
- **Schema 设计审查:类型设计 → 分页模式 → 安全风险评估**
42
-
43
- **GraphQL Bug 诊断:查询分析 → Resolver 链追踪 → 修复**
44
-
45
- ## 核心规则
46
-
47
- - 使用 Schema-First 设计(SDL)定义类型和操作
48
- - Resolver 保持简洁,业务逻辑在 Service 层
49
- - 使用 DataLoader 解决 N+1 查询问题
50
- - Mutation 命名使用动词(create/update/delete)
51
- - 使用 Connection 模式实现分页
52
- - 限制查询深度和复杂度防止滥用
53
- - 遇到不确定的 Schema 设计时先查 GraphQL 官方规范
54
-
55
- ## 知识来源
56
-
57
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
58
-
59
- - graphql-docs: 2024 — https://graphql.org/learn/
60
-
61
- ## 工作流
62
-
63
- | 场景 | 触发方式 |
64
- |------|----------|
65
- | 新建 GraphQL Type + Resolver + DataLoader | 调用 MCP 工具 `graphql_new_graphql_type` |
66
- | N+1 检测与修复:扫描 Resolver → 识别批量模式 → 加 DataLoader | 调用 MCP 工具 `graphql_fix:n+1` |
67
- | Schema 设计审查:类型设计 → 分页模式 → 安全风险评估 | 调用 MCP 工具 `graphql_review:schema` |
68
- | GraphQL Bug 诊断:查询分析 → Resolver 链追踪 → 修复 | 调用 MCP 工具 `graphql_diagnose_bug` |
@@ -1,80 +0,0 @@
1
- ---
2
- name: devflow:knowledge
3
- description: 搜索技术文档知识库 — React、Vue、Nest、TypeScript 等官方文档
4
- required_mcp_tools:
5
- - get_knowledge
6
- ---
7
-
8
- <HARD-GATE>
9
- 收到 devflow:knowledge 时,必须先调用以下 MCP 工具之一:
10
- get_knowledge
11
- </HARD-GATE>
12
-
13
- ## MANDATORY FIRST STEP - Skill Registration
14
-
15
- > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
16
-
17
- ```bash
18
- mkdir -p ~/.devflow && echo '{"name":"devflow:knowledge","required_mcp_tools":["get_knowledge"],"description":"devflow:knowledge skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
19
- ```
20
-
21
- After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
22
- - `mcp__devflow__get_knowledge`
23
-
24
- **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
25
-
26
- When the skill execution is complete, clean up:
27
- ```bash
28
- rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
29
- ```
30
-
31
- ## 工作流(必须按顺序执行)
32
-
33
- ### Step 1: 获取精确上下文
34
- 调用 `mcp__devflow__get_project_context` 获取与用户问题相关的代码、记忆和知识库信息。
35
- 这一步确保你拿到的是项目真实状态,而非凭空猜测。
36
-
37
- ### Step 2: 分析
38
- 基于 Step 1 返回的上下文,分析问题根因或设计方案。
39
- 此时可以自由使用 Read 查看具体文件。
40
-
41
- ### Step 3: 执行
42
- 根据分析结果修改代码,逐文件编辑。
43
-
44
- ### Step 4: 验证
45
- 运行类型检查和测试,确保改动正确。
46
-
47
- ## 可用工具
48
-
49
- | 工具 | 何时调用 |
50
- |------|----------|
51
- | `mcp__devflow__get_project_context` | 每次任务第一步(必须) |
52
- | `mcp__devflow__get_knowledge` | 按需调用 |
53
-
54
- ## 规则
55
- - 永远从 `mcp__devflow__get_project_context` 开始——你不知道项目里有什么
56
- - 上下文返回后,用 Read 确认关键文件
57
- - 改完代码后跑类型检查
58
-
59
- ## 规则
60
- - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
- - 上下文返回后,用 Read 确认关键文件
62
- - 改完代码后跑类型检查
63
-
64
- ## 规则
65
- - 永远从 `get_knowledge` 开始——你不知道项目里有什么
66
- - 上下文返回后,用 Read 确认关键文件
67
- - 改完代码后跑类型检查
68
-
69
- # /devflow:knowledge
70
-
71
- ## 执行
72
-
73
- 调用 `mcp__devflow__get_knowledge` MCP 工具:
74
-
75
- ```
76
- query = 用户的查询内容
77
- scope = "all" (默认;可选 react/vue/nest)
78
- ```
79
-
80
- DevFlow 知识库预索引了 React、Vue、NestJS、TypeScript 官方文档(带版本标签和代码示例),比 WebSearch/WebFetch 更快更准。