@devflow-tools/cli 0.18.28 → 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.
- package/dist/lib/plugin-setup.d.ts.map +1 -1
- package/dist/lib/plugin-setup.js +5 -2
- package/dist/lib/plugin-setup.js.map +1 -1
- package/dist/plugin-files/.claude-plugin/plugin.json +1 -1
- package/dist/plugin-files/dist/command-registry.json +7 -7
- package/dist/plugin-files/dist/hooks/hook-daemon.js +2 -2
- package/dist/plugin-files/package.json +13 -14
- package/package.json +28 -28
- package/dist/plugin-files/CLAUDE.md +0 -34
- package/dist/plugin-files/dist/skills/devflow:animation/SKILL.md +0 -65
- package/dist/plugin-files/dist/skills/devflow:context/SKILL.md +0 -90
- package/dist/plugin-files/dist/skills/devflow:css/SKILL.md +0 -65
- package/dist/plugin-files/dist/skills/devflow:delivery/SKILL.md +0 -126
- package/dist/plugin-files/dist/skills/devflow:docker/SKILL.md +0 -69
- package/dist/plugin-files/dist/skills/devflow:doctor/SKILL.md +0 -43
- package/dist/plugin-files/dist/skills/devflow:electron/SKILL.md +0 -69
- package/dist/plugin-files/dist/skills/devflow:git/SKILL.md +0 -69
- package/dist/plugin-files/dist/skills/devflow:graph/SKILL.md +0 -80
- package/dist/plugin-files/dist/skills/devflow:graphql/SKILL.md +0 -68
- package/dist/plugin-files/dist/skills/devflow:knowledge/SKILL.md +0 -80
- package/dist/plugin-files/dist/skills/devflow:memory/SKILL.md +0 -79
- package/dist/plugin-files/dist/skills/devflow:nest/SKILL.md +0 -70
- package/dist/plugin-files/dist/skills/devflow:nextjs/SKILL.md +0 -67
- package/dist/plugin-files/dist/skills/devflow:performance/SKILL.md +0 -69
- package/dist/plugin-files/dist/skills/devflow:react/SKILL.md +0 -96
- package/dist/plugin-files/dist/skills/devflow:tailwind/SKILL.md +0 -67
- package/dist/plugin-files/dist/skills/devflow:taro/SKILL.md +0 -68
- package/dist/plugin-files/dist/skills/devflow:ui-layout/SKILL.md +0 -65
- package/dist/plugin-files/dist/skills/devflow:vue/SKILL.md +0 -74
- package/dist/plugin-files/dist/skills/devflow:workflow/SKILL.md +0 -80
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# DevFlow Plugin for Claude Code
|
|
2
|
-
|
|
3
|
-
This plugin provides the DevFlow developer intelligence platform inside Claude Code.
|
|
4
|
-
|
|
5
|
-
## What You Get
|
|
6
|
-
|
|
7
|
-
- **Context Engine** — Search code by natural language query. Use `/devflow:context` before making any code change.
|
|
8
|
-
- **Graph Engine** — View architecture layers, file groups, and dependency graphs. Use `/devflow:graph` to understand module structure.
|
|
9
|
-
- **Memory Engine** — Access project conventions, tech stack, and past decisions. Use `/devflow:memory` at the start of every task.
|
|
10
|
-
- **Knowledge Engine** — Search official docs for React, Vue, NestJS, TypeScript, and more. Use `/devflow:knowledge` when unsure about API usage.
|
|
11
|
-
- **Workflow Engine** — Run standardized development workflows (bug fixes, features, reviews). Use `/devflow:workflow` for complex multi-step tasks.
|
|
12
|
-
- **Domain Plugins** — Specialized expertise for 14 frameworks/tools via `/devflow:react`, `/devflow:git`, `/devflow:nextjs`, etc.
|
|
13
|
-
|
|
14
|
-
## How to Use
|
|
15
|
-
|
|
16
|
-
1. **Before any code change:** `/devflow:context` to understand the current implementation
|
|
17
|
-
2. **Before writing new code:** `/devflow:memory` to check conventions
|
|
18
|
-
3. **When stuck on API:** `/devflow:knowledge` to search docs
|
|
19
|
-
4. **When debugging:** `/devflow:graph` to trace dependencies
|
|
20
|
-
5. **For complex workflows:** `/devflow:workflow` or domain-specific commands like `/devflow:react`
|
|
21
|
-
|
|
22
|
-
## Architecture
|
|
23
|
-
|
|
24
|
-
This plugin is a thin skill layer. The real work happens in:
|
|
25
|
-
- `devflow-mcp` — MCP stdio server (auto-started by this plugin)
|
|
26
|
-
- `devflow` CLI — Command-line interface for direct usage
|
|
27
|
-
|
|
28
|
-
## Project Setup
|
|
29
|
-
|
|
30
|
-
If DevFlow hasn't been initialized in the current project yet, run:
|
|
31
|
-
```
|
|
32
|
-
devflow init
|
|
33
|
-
devflow index
|
|
34
|
-
```
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:animation
|
|
3
|
-
description: Animation 动画专家 — CSS 动画、Framer Motion、GSAP、Lottie、性能优化
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- animation_suggest
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:animation 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
animation_suggest
|
|
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:animation","required_mcp_tools":["animation_suggest"],"description":"devflow:animation 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__plugin_devflow_devflow__animation_suggest`
|
|
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
|
-
# ✨ ANIMATION
|
|
32
|
-
|
|
33
|
-
你是一个动画专家。精通 CSS Animation、Framer Motion、GSAP。动画必须 60fps 且支持 prefers-reduced-motion。
|
|
34
|
-
|
|
35
|
-
## 适用场景
|
|
36
|
-
|
|
37
|
-
**动画审计:性能检查 → 可访问性 → 实现质量**
|
|
38
|
-
|
|
39
|
-
**新建动画:需求分析 → 选型建议 → 实现 → 性能验证**
|
|
40
|
-
|
|
41
|
-
**动画 GPU 迁移:扫描 → 替换为 GPU 属性 → 验证**
|
|
42
|
-
|
|
43
|
-
## 核心规则
|
|
44
|
-
|
|
45
|
-
- 动画属性只使用 transform 和 opacity(GPU 加速)
|
|
46
|
-
- 过渡动画 200-300ms,入场 300-500ms
|
|
47
|
-
- 使用 ease-out 入场、ease-in 退场
|
|
48
|
-
- 尊重 prefers-reduced-motion,提供减弱方案
|
|
49
|
-
- 避免同时动画过多元素(批量编排使用 staggerChildren)
|
|
50
|
-
- 使用 AnimatePresence 处理 React 组件退出动画
|
|
51
|
-
- Lottie 动画控制文件大小 < 50KB
|
|
52
|
-
|
|
53
|
-
## 知识来源
|
|
54
|
-
|
|
55
|
-
以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
|
|
56
|
-
|
|
57
|
-
- animation-docs: 2024 — https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animations
|
|
58
|
-
|
|
59
|
-
## 工作流
|
|
60
|
-
|
|
61
|
-
| 场景 | 触发方式 |
|
|
62
|
-
|------|----------|
|
|
63
|
-
| 动画审计:性能检查 → 可访问性 → 实现质量 | 调用 MCP 工具 `animation_audit:animation` |
|
|
64
|
-
| 新建动画:需求分析 → 选型建议 → 实现 → 性能验证 | 调用 MCP 工具 `animation_new:animation` |
|
|
65
|
-
| 动画 GPU 迁移:扫描 → 替换为 GPU 属性 → 验证 | 调用 MCP 工具 `animation_migrate:gpu-animation` |
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:context
|
|
3
|
-
description: 检索项目上下文 — 自然语言查询相关代码、符号、依赖关系
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- get_project_context
|
|
6
|
-
- search_symbol
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<HARD-GATE>
|
|
10
|
-
收到 devflow:context 时,必须先调用以下 MCP 工具之一:
|
|
11
|
-
get_project_context / search_symbol
|
|
12
|
-
</HARD-GATE>
|
|
13
|
-
|
|
14
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
15
|
-
|
|
16
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:context","required_mcp_tools":["get_project_context","search_symbol"],"description":"devflow:context skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
23
|
-
- `mcp__plugin_devflow_devflow__get_project_context`
|
|
24
|
-
- `mcp__plugin_devflow_devflow__search_symbol`
|
|
25
|
-
|
|
26
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
27
|
-
|
|
28
|
-
When the skill execution is complete, clean up:
|
|
29
|
-
```bash
|
|
30
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## 工作流(必须按顺序执行)
|
|
34
|
-
|
|
35
|
-
### Step 1: 获取精确上下文
|
|
36
|
-
调用 `mcp__plugin_devflow_devflow__get_project_context` 获取与用户问题相关的代码、记忆和知识库信息。
|
|
37
|
-
这一步确保你拿到的是项目真实状态,而非凭空猜测。
|
|
38
|
-
|
|
39
|
-
### Step 2: 分析
|
|
40
|
-
基于 Step 1 返回的上下文,分析问题根因或设计方案。
|
|
41
|
-
此时可以自由使用 Read 查看具体文件。
|
|
42
|
-
|
|
43
|
-
### Step 3: 执行
|
|
44
|
-
根据分析结果修改代码,逐文件编辑。
|
|
45
|
-
|
|
46
|
-
### Step 4: 验证
|
|
47
|
-
运行类型检查和测试,确保改动正确。
|
|
48
|
-
|
|
49
|
-
## 可用工具
|
|
50
|
-
|
|
51
|
-
| 工具 | 何时调用 |
|
|
52
|
-
|------|----------|
|
|
53
|
-
| `mcp__plugin_devflow_devflow__get_project_context` | 每次任务第一步(必须) |
|
|
54
|
-
| `mcp__plugin_devflow_devflow__get_project_context` | 按需调用 |
|
|
55
|
-
| `mcp__plugin_devflow_devflow__search_symbol` | 按需调用 |
|
|
56
|
-
|
|
57
|
-
## 规则
|
|
58
|
-
- 永远从 `mcp__plugin_devflow_devflow__get_project_context` 开始——你不知道项目里有什么
|
|
59
|
-
- 上下文返回后,用 Read 确认关键文件
|
|
60
|
-
- 改完代码后跑类型检查
|
|
61
|
-
|
|
62
|
-
## 规则
|
|
63
|
-
- 永远从 `get_project_context` 开始——你不知道项目里有什么
|
|
64
|
-
- 上下文返回后,用 Read 确认关键文件
|
|
65
|
-
- 改完代码后跑类型检查
|
|
66
|
-
|
|
67
|
-
## 规则
|
|
68
|
-
- 永远从 `get_project_context` 开始——你不知道项目里有什么
|
|
69
|
-
- 上下文返回后,用 Read 确认关键文件
|
|
70
|
-
- 改完代码后跑类型检查
|
|
71
|
-
|
|
72
|
-
# /devflow:context
|
|
73
|
-
|
|
74
|
-
## 执行
|
|
75
|
-
|
|
76
|
-
1. 如果用户的查询包含中文,先将其中的中文关键词翻译为英文代码术语(空格分隔)
|
|
77
|
-
2. 调用 `mcp__plugin_devflow_devflow__get_project_context` MCP 工具:
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
query = 用户的原始查询内容(包含中文)
|
|
81
|
-
expandedTerms = 你翻译的英文关键词(如 "code review audit module")
|
|
82
|
-
mode = "fast" (首次调用;如需更深入结果,再改用 "deep")
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
也可以使用 `mcp__plugin_devflow_devflow__search_symbol` 按符号名搜索代码。
|
|
86
|
-
|
|
87
|
-
示例:
|
|
88
|
-
- 用户查询 "代码审核模块的流程" → expandedTerms = "code review audit module workflow pipeline process"
|
|
89
|
-
- 用户查询 "用户登录认证逻辑" → expandedTerms = "user login authentication auth logic service handler"
|
|
90
|
-
- 用户查询 "数据库缓存策略" → expandedTerms = "database db cache memo redis storage strategy"
|
|
@@ -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__plugin_devflow_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__plugin_devflow_devflow__delivery_status`
|
|
38
|
-
- `mcp__plugin_devflow_devflow__delivery_create_case`
|
|
39
|
-
- `mcp__plugin_devflow_devflow__delivery_answer`
|
|
40
|
-
- `mcp__plugin_devflow_devflow__delivery_revise`
|
|
41
|
-
- `mcp__plugin_devflow_devflow__delivery_compare_options`
|
|
42
|
-
- `mcp__plugin_devflow_devflow__delivery_approve`
|
|
43
|
-
- `mcp__plugin_devflow_devflow__delivery_reject`
|
|
44
|
-
- `mcp__plugin_devflow_devflow__delivery_resume`
|
|
45
|
-
- `mcp__plugin_devflow_devflow__delivery_recover_task`
|
|
46
|
-
- `mcp__plugin_devflow_devflow__delivery_admit_worktree`
|
|
47
|
-
- `mcp__plugin_devflow_devflow__delivery_refresh_activation`
|
|
48
|
-
- `mcp__plugin_devflow_devflow__delivery_advance`
|
|
49
|
-
- `mcp__plugin_devflow_devflow__delivery_retry_task`
|
|
50
|
-
- `mcp__plugin_devflow_devflow__delivery_import_external_change`
|
|
51
|
-
- `mcp__plugin_devflow_devflow__delivery_export`
|
|
52
|
-
- `mcp__plugin_devflow_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__plugin_devflow_devflow__delivery_*` 工具推进一个持久化交付案件。案件状态和 `nextActions` 是唯一的流程事实来源。
|
|
64
|
-
|
|
65
|
-
## 开始案件
|
|
66
|
-
|
|
67
|
-
收到新的交付需求时,调用 `mcp__plugin_devflow_devflow__delivery_create_case`。使用当前项目绝对路径;默认 `baseRef=HEAD`、`targetRef=main`,除非用户明确指定其他值。为 actor、session、execution 和每次写操作生成稳定且可追踪的标识与幂等键。
|
|
68
|
-
- 若上下文检索发现同名组件、同一路由或多个框架实现,将候选路径通过 `existingImplementations` 传入创建案件参数,让案件先进入阻塞澄清;不要自行选择复用或替换。
|
|
69
|
-
|
|
70
|
-
## 推进规则
|
|
71
|
-
|
|
72
|
-
- 调用 `mcp__plugin_devflow_devflow__get_project_context` 后必须等待该 MCP 返回,再进行任何 Read/Grep/Glob/Bash/Write/Edit;不要并发发起上下文请求和直接工具调用。
|
|
73
|
-
- 每次写操作后读取返回状态;状态不明确或发生 stale turn 时调用 `mcp__plugin_devflow_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__plugin_devflow_devflow__delivery_approve`;不得代替用户批准。
|
|
98
|
-
- 审批返回后不要结束会话:立即读取同一次返回的 `stage` 和 `nextActions`,按其允许的下一步继续推进;只有 `nextActions` 为空或用户明确暂停时才结束。
|
|
99
|
-
- `mcp__plugin_devflow_devflow__delivery_advance` 用于推进已满足的状态,`mcp__plugin_devflow_devflow__delivery_resume` 只恢复已经具备运行条件的 gate 或 task。
|
|
100
|
-
- 失败任务只通过 `mcp__plugin_devflow_devflow__delivery_retry_task` 重试;取消和导出分别使用 `mcp__plugin_devflow_devflow__delivery_cancel` 与 `mcp__plugin_devflow_devflow__delivery_export`。
|
|
101
|
-
- Claude 在当前工作区产生的修改不是 Delivery 输出;只能先调用 `mcp__plugin_devflow_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__plugin_devflow_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__plugin_devflow_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,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:doctor
|
|
3
|
-
description: 项目健康检查 — 索引状态、引擎就绪、插件列表
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- devflow_runtime_status
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:doctor 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
devflow_runtime_status
|
|
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:doctor","required_mcp_tools":["devflow_runtime_status"],"description":"devflow:doctor 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__plugin_devflow_devflow__devflow_runtime_status`
|
|
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
|
-
快速了解 DevFlow 在当前项目中的运行状态。任务开始前用一次即可。
|
|
34
|
-
|
|
35
|
-
调用 `mcp__plugin_devflow_devflow__devflow_runtime_status` 检查当前 Claude session、task turn 和语义上下文是否正确绑定。该工具是只读控制面诊断,不依赖已有 context receipt。
|
|
36
|
-
|
|
37
|
-
## 检查项
|
|
38
|
-
|
|
39
|
-
- 文件索引是否最新
|
|
40
|
-
- Context/Graph/Memory/Knowledge/Workflow 引擎是否就绪
|
|
41
|
-
- 已安装哪些领域插件
|
|
42
|
-
- 是否有已知配置问题
|
|
43
|
-
**MCP Gateway 策略**: 调用前会校验 Session Token 和调用合法性。在支持 PreToolUse Hook 的 Claude Code 等宿主中,无有效收据的原生工具调用会被拦截;不提供生命周期 Hook 的宿主不会声称已执行原生拦截,而是依赖 canonical MCP receipts 和显式 capability degradation。收据有效期 30 秒,过期后需重新通过 MCP 工具获取。
|
|
@@ -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__plugin_devflow_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__plugin_devflow_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` |
|